安装 access_token = 'Your Token'
px.set_mapbox_access_token(access_token)
import plotly.express as px
#px.set_mapbox_access_token(open(".mapbox_token").read())
df = px.data.carshare()
fig = px.scatter_mapbox(df, lat="centroid_lat", lon="centroid_lon", color="peak_hour", size="car_hours",
color_continuous_scale=[(0.00, "red"), (0.33, "red"),
(0.33, "green"), (0.66, "green"),
(0.66, "blue"), (1.00, "blue")]
, size_max=15, zoom=10)
fig.show()
时出现以下错误
npm i
我试过npm ERR! While resolving: angular-image-editor@0.0.1
npm ERR! Found: @angular/common@9.0.7
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"~9.0.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^6.0.0-rc.0 || ^6.0.0" from angular-cropperjs@1.0.2
npm ERR! node_modules/angular-cropperjs
npm ERR! angular-cropperjs@"^1.0.1" from the root project
但我仍然遇到同样的错误。
这是我的package.json:
npm cache clean --force
答案 0 :(得分:0)
据我所知,问题是由于依赖关系 angular-cropperjs
。
此软件包需要 @angular/core
版本 6.x.x
见https://github.com/matheusdavidson/angular-cropperjs/blob/master/package.json
但是你的 angular 项目的版本是 9.x.x
要么使用不同的依赖项,要么降级您的 Angular 项目依赖项。