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.
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:
pymol in 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:
libgl1
Re-deploy your app on Streamlit Cloud
Once you make the above changes, your app should successfully deploy!