由于 AttributeError,无法加载 Dash Core 组件

Dash Core components can't be loaded due to an AttributeError

OS: Windows 10
Python3.8.2

已安装的 Dash 组件是:(pip list | grep dash):
破折号 1.16.2
破折号核心组件 1.12.1
破折号-html-组件 1.1.1
破折号渲染器 1.8.2
破折号-table 4.10.1
jupyter-仪表板 0.7.0

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)

Python 脚本中止,控制台中出现错误消息:

AttributeError: 模块 'dash_core_components' 没有属性 'Graph'

现在已修复并按预期工作。

在我卸载所有 dash 组件并按以下顺序重新安装它们之后:

  1. dash-core-components
  2. dash(获取所有依赖项)
    并重新运行脚本它工作正常。
  • 我的配置在最后
    破折号 1.16.2
    dash-core-components1.12.1
    dash-html-components1.1.1
    dash-renderer1.8.2
    dash-table 4.10.1