✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

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

Thx in advance - each idea is appreciated.

  • Environment

OS: Windows 10
Python 3.8.2

The installed Dash components are: (pip list | grep dash):
dash 1.16.2
dash-core-components 1.12.1
dash-html-components 1.1.1
dash-renderer 1.8.2
dash-table 4.10.1
jupyter-dashboards 0.7.0

  • Used Python code
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)
  • Given result

Python script aborted with en error message in the console:

AttributeError: module ‘dash_core_components’ has no attribute 'Graph’

It’s now fixed and works as expected.

After I uninstalled all dash components and reinstalled them in this order:

dash-core-components
dash (tooks all dependencies)
and rerun the script it works fine.

My configuration at the end
dash 1.16.2
dash-core-components 1.12.1
dash-html-components 1.1.1
dash-renderer 1.8.2
dash-table 4.10.1