0
votes

) When I want to import dash_core_components

import dash_core_components as dcc

it throws the following error:

File "d:\Desktop\python_projekte\ds2.py", line 1, in <module>
    import dash_core_components as dcc
  File "C:\Python39\lib\site-packages\dash_core_components\__init__.py", line 1, in <module>
    from dash.dcc import *  # noqa: F401, F403, E402
ModuleNotFoundError: No module named 'dash.dcc'

But I acually installed dash_core_components and I also tried updating it, but I still receive this error. I've got also a similar error with dash_html_components.

I really don't know what to do. Does someone have an advice? :-)

1
Maybe look at this stackoverflow.com/a/69142985/9098350, looks similar. - Bas van der Linden
You may need to reinstall or upgrade dash pip install -U dash or if you are using environments to manage packages, double check you have dash installed in the environment you're using or that you have the correct environment activated. - Chuck Tucker

1 Answers

0
votes

For people coming across this issue in 2022, you probably have import dash_core_components as dcc from using previous versions of dash. The current up-to-date way to import dash core components is from dash import dcc.