我只是想让Dash教程启动并运行,但是每次我尝试运行它,从文档中复制并粘贴到我的asdf.py中时,我都会得到错误"ImportError:无法从‘dash’导入名称'dcc‘“。我试过卸载和重新安装破折号,以及重命名文件,但一无所获。任何帮助都是感激的,谢谢!
from dash import Dash, dcc, html, Input, Output
app = Dash(__name__)
app.layout = html.Div([
html.H6("Change the value in the text box to see callbacks in action!"),
html.Div([
"Input: ",
dcc.Input(id='my-input', value='initial value', type='text')
]),
html.Br(),
html.Div(id='my-output'),
])发布于 2022-04-27 13:46:03
要么尝试:pip install dash --upgrade
或者(用于旧版本):import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output
希望这能有所帮助
https://stackoverflow.com/questions/71431193
复制相似问题