Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(Python) dash core components - ModuleNotFound

) 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? :-)

like image 287
Denny Avatar asked Aug 03 '26 20:08

Denny


1 Answers

For people coming across this issue in 2022, the syntax of:

import dash_core_components as dcc
import dash_html_components as html

has been deprecated. Use this syntax instead:

from dash import dcc
from dash import html
like image 148
tnwei Avatar answered Aug 06 '26 09:08

tnwei



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!