I made the mistake of updating a package near the end of a project that utilized the dash core components (to get a feature to work). The project has stopped working. According to this site it states it is dependent on dash, but fails to work with the latest version of dash if I understand correctly. Is there an easy way to get these packages to work again?
https://pypi.org/project/dash-core-components/2.0.0/
Packages I was using:
JavaScript
x
4
1
import dash_core_components as dcc
2
import dash_html_components as html
3
import dash_bootstrap_components as dbc
4
Error I get now:
JavaScript
1
18
18
1
---------------------------------------------------------------------------
2
ModuleNotFoundError Traceback (most recent call last)
3
<ipython-input-8-8a1bdb142803> in <module>
4
1 import wikipedia
5
2 import dash
6
----> 3 import dash_core_components as dcc
7
4 #import dash_html_components as html
8
5 from dash.dependencies import Input, Output, State
9
10
~anaconda3libsite-packagesdash_core_components__init__.py in <module>
11
----> 1 from dash.dcc import * # noqa: F401, F403, E402
12
2 from dash.dcc import __version__ # noqa: F401, F403, E402
13
3 import warnings
14
4
15
5 warnings.warn(
16
17
ModuleNotFoundError: No module named 'dash.dcc'
18
Advertisement
Answer
You don’t need to go back to be able to use dash core components. They are still part of dash, they have just moved to the main repo.
By installing dash pip install dash
you are already installing dash_core_components. But, you will need to access the library like this:
JavaScript
1
2
1
from dash import dcc
2
instead of how it was before
JavaScript
1
2
1
import dash_core_components as dcc
2