plotly / dash-component-boilerplate

Get started creating your own Dash components here.
275 stars 184 forks source link

Import errors #150

Closed Tedmcm closed 1 year ago

Tedmcm commented 1 year ago

Im trying to create a component and when i tried to run the usage.py file im getting an import error: I have recently received similar errors when trying to run some dash apps and it seems to be from an old version of dash, I would have thought running this inside of this repo it would have an updated version of dash and I dont want to mess anything else up with this process? Im still in my base env but when i created this project i followed the instructions and followed these instructions: pip install cookiecutter pip install virtualenv The project has the package.json file.. The instructions didnt say to go into a env? I assumed once i created that venv file that was ok, so now im not sure what to do? pip install a newer version of dash? Do i do that while im in the base env and in which file/folder? Error message: File "usage.py", line 2, in from dash import Dash, callback, html, Input, Output ImportError: cannot import name 'callback' from 'dash'

Thanks!

T4rk1n commented 1 year ago

You can do the steps manually if the boilerplate failed to create the venv

python -m venv venv
. venv/bin/activate
pip install -r requirements.txt
npm i
npm run build
# Once everything is built, you can run usage.py
python usage.py