My streamlit app runs fine locally on my computer, but it fails to deploy on streamlit cloud. Does anyone know how to fix it?
The error that I get is
Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
When I pull the code from the github and run it locally, it works fine.
Thank you very much.
I got same thing but You can actually check which dependency. For me it was jinja. I had to do
pip3 install jinja2==3.0.1
Thank you for your reply! Do you know, how could I check which dependency causes the problem?
The issue was with including
python=3.9.12 as a dependency. Streamlit Cloud runs your app in a virtual environment. Installing Python as a dependency will mean that the other dependencies will be installed in a virtual environment different than the one your app is running in. As such, none of your Python depdencies are installed in the same virtual env as
app.py, causing import errors at runtime.
The solution is to:
- Delete your app on Streamlit Cloud
- Remove the
- python=3.9.12 line from
environment.yml so that the contents are:
distance.py requires libGL to be installed as a Linux / apt-get dependency. To install it, create a
packages.txt file in your repo containing:
- Re-deploy your app on Streamlit Cloud
Once you make the above changes, your app should successfully deploy!
Thank you very much! It worked! May I ask, how did you understand what were the problems?