简体   繁体   中英

ImportError: cannot import name 'Input' from 'dash'

I'm having this error when I try to run my code.. this error started to happen when I installed a new library, an auxiliary library of dash bootstrap components, this library: [Dash Bootstrap Theme Explorer][1]

These are my imports:

from dash import html, dcc
from dash.dependencies import Input, Output
import pandas as pd
import numpy as np
import dash_bootstrap_components as dbc
from dash_bootstrap_templates import load_figure_template
from app import *
import plotly.express as px ```

Which version of dash are you using?

Try:

pip install dash --upgrade

I fixed the problem. I had to uninstall the 3 dash libraries I was using:

pip uninstall dash

pip uninstall dash-bootstrap-templates

pip uninstall dash-bootstrap-templates

and then install again and update:

pip install dash --upgrade

pip install dash-bootstrap-templates --upgrade

pip install dash-bootstrap-templates

pip3 install --upgrade requests

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM