I’m trying to deploy an app from this repository but I’m getting an Error installing requirements issue when deploying. The app is actually up and running via Heroku here but I want to try streamlit share.
The error message is below. When I run conda env update -n <env_name> --file projects/pitchcast/environment.yml locally I get no problem.
[ UTC ] Logs for dafriedman97-pitchcast-appapp-mdo5j8.streamlit.app/
[17:13:42] 🚀 Starting up repository: 'pitchcast', branch: 'main', main module: 'app/app.py'
[17:13:42] 🐙 Cloning repository...
[17:13:43] 🐙 Cloning into '/app/pitchcast'...
[17:13:43] 🐙 Cloned repository!
[17:13:43] 🐙 Pulling code changes from Github...
[17:13:44] 📦 Processing dependencies...
Collecting package metadata (repodata.json): ...working... [2023-01-18 17:15:11.761736] done
Solving environment: [2023-01-18 17:15:11.763305] ...working... [2023-01-18 17:21:30.585098] bash: line 3: 16 Killed /home/appuser/.conda/bin/conda env update -n base --file environment.yml
[17:21:31] ❗️ installer returned a non-zero exit code
[17:21:31] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[17:23:02] ❗️ Streamlit server consistently failed status checks
[17:23:02] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.
Streamlit Cloud won’t use both the environment and requirements file. I would eliminate the environment file and just use requirements.txt by itself. (And it may be necessary to reboot the app after messing with the environment to give it an encouraging push.)
Thanks @mathcatsand. I tried removing requirements.txt (I added that for the Heroku app–environment.yml is what I really want) but I’m still getting an issue
[18:39:41] 🖥 Provisioning machine...
[18:39:42] 🚀 Starting up repository: 'pitchcast', branch: 'share', main module: 'app/app.py'
[18:39:42] 🐙 Cloning repository...
[18:39:44] 🐙 Cloning into '/app/pitchcast'...
[18:39:44] 🐙 Cloned repository!
[18:39:44] 🐙 Pulling code changes from Github...
[18:39:45] 📦 Processing dependencies...
[18:39:46] 🎛 Preparing system...
[18:39:46] ⛓ Spinning up manager process...
Collecting package metadata (repodata.json): ...working... [2023-01-18 18:41:26.112493] done
[18:47:48] ❗️ installer returned a non-zero exit code
[18:47:48] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[18:49:22] ❗️ Streamlit server consistently failed status checks
[18:49:22] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.
Can you try using the requirements.txt for Streamlit Cloud, just to check if it works? There are several threads where people had issues making Streamlit Cloud process the environment.yml file as it does appear to be a bit more tempermental. It appears your environment file is installing a few more things than your requirements file and also some different versions, so either way I’d trim things down to a bare minimum for what’s being passed to Streamlit Cloud.
So if you can confirm your requirements file can work, I’d try to emulate it in the environment file next:
@mathcatsand I deleted the app and restarted and it worked! So the solution was to just have requirements.txt rather than environment.yml and requirements.txt
One open question though: I’m wondering if there is a way to keep environment.yml in the repo (and have Streamlit Cloud ignore it). Essentially I want requirements.txt for Streamlit but environment.yml for the project as a whole.
I believe Streamlit just uses the first one it finds and I’m not sure how to command it from the Streamlit Cloud side to do otherwise. After you confirmed that the requirements.txt file works, did you iterate back and see if you could get the simpler version of the environment.yml file to work?
Could you keep separate branches for the deployment, or could you try from your other deployment to do something tricky? Make it do something like accept a different name than environments.yml so Streamlit Cloud wouldn’t recognize it as an environment setup file?
Getting the same original issue when I use the simpler environment.yml
Collecting package metadata (repodata.json): ...working... [2023-01-19 02:19:21.849859] done
Solving environment: ...working... [2023-01-19 02:23:34.173510] bash: line 3: 16 Killed /home/appuser/.conda/bin/conda env update -n base --file environment.yml
[02:23:35] ❗️ installer returned a non-zero exit code
[02:23:35] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[02:25:05] ❗️ Streamlit server consistently failed status checks
[02:25:05] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.
Just to check, did you manually reboot the app after changing the environment file? I know it was correctly parsed on a simple app that just imports matplotlib to test the environment. Hmmm…
Protobuf is just another package that you can set, same matplotlib, numpy, pandas, etc.
I think it’s something like
protobuf<3.20,>=3.9.2
so you could try pinning it at a specific 3.19.x version.
As much it works locally, streamlit shows an error when deploying:
[18:56:02] ❗️ installer returned a non-zero exit code
[18:56:02] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.```
I also have requirements.txt in my repo, but it seems unrecognized. Any suggestions?
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.