操作系统: Windows 10
Python 3.8.2
已安装的Dash组件是:(pip列表\ grep破折号):
破折号1.16.2
仪表板-核心.部件1.12.1
dash-html-组件1.1.1
仪表板-渲染器1.8.2
表4.10.1
jupyter-仪表板
import dash_core_components as dcc
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x="sepal_width", y="sepal_length")
dcc.Graph(figure=fig)使用控制台中的en错误消息中止Python脚本:
AttributeError:模块“dash_core_components”没有属性“dash_core_components”
https://dash.plotly.com/dash-core-components/graph:

发布于 2020-09-28 08:25:56
它现在是固定的,并按预期工作。
在卸载所有破折号组件并按以下顺序重新安装它们之后:
并重新运行脚本,它在最后运行fine.
破折号1.16.2
仪表板-核心.部件1.12.1
dash-html-组件1.1.1
仪表板-渲染器1.8.2
表4.10.1
https://stackoverflow.com/questions/64091707
复制相似问题