I’ve setup streamlit locally on my mac using:
python -m venv streamlit_env
pip install streamlit
pip install -r requirements.txt
where requirements.txt has:
running pip list shows (among other modules)
But yet when I run with the streamlit_env activated I still get this error:
ModuleNotFoundError: No module named ‘sqlalchemy’. You need to install the ‘sqlalchemy’ package to use this connection.
Any ideas on what I’m missing?
Thanks for posting!
Sometimes Python might not be looking in the right place for the installed modules. Check your Python path using the following code to verify while your venv is still activated:
python -c "import sys; print(sys.path)"
If you’re still running into errors, try running the app without the virtual environment to troubleshoot.
Found out that even when I was in the streamlit_env it was picking up a streamlit from a bin outside of the streamlit_env. Once I got that straightened out then it was able to find the module.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
Glad it worked!