)当我想导入dash_core_components时
import dash_core_components as dcc
它会抛出以下错误:
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'
但是我实际上安装了dash_core_components,并且我也尝试更新它,但是我仍然收到这个错误。我在dash_html_components中也收到了类似的错误。
我真的不知道该怎么办。有人能给我个建议吗?:-)
2条答案
按热度按时间sqougxex1#
对于在2022年遇到此问题的人,以下语法:
已弃用。请改用以下语法:
lyr7nygr2#
import dash_html_components as html
的情况相同。使用
from dash import html