Deployment fails due to incompatible library versions

My first deployment to the Streamlit Cloud :smiley: (from Github repo GitHub - janesp/region-availability-interactive: Region availability interactive - showing availability regions on a map) - runs fine locally, but encounters version incompatibilities on Streamlit Cloud:

[     UTC     ] Logs for janesp-region-availability-interactive-rg-avail-inter-p47iu2.streamlitapp.com/
────────────────────────────────────────────────────────────────────────────────────────
[23:21:26] πŸš€ Starting up repository: 'region-availability-interactive', branch: 'main', main module: 'rg_avail_inter.py'
[23:21:26] πŸ™ Cloning repository...
[23:21:27] πŸ™ Cloning into '/app/region-availability-interactive'...
[23:21:27] πŸ™ Cloned repository!
[23:21:27] πŸ™ Pulling code changes from Github...
[23:21:28] πŸ“¦ Processing dependencies...
──────────────────────────────────────── pip ───────────────────────────────────────────
Collecting pandas
  Downloading pandas-1.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.2/12.2 MB 270.6 MB/s eta 0:00:00[2022-10-19 23:21:29.867215] 
Collecting geopandas
  Downloading geopandas-0.11.1-py3-none-any.whl (1.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1.0/1.0 MB 300.1 MB/s eta 0:00:00[2022-10-19 23:21:29.944529] 
Collecting matplotlib
  Downloading matplotlib-3.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.8 MB)   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.8/11.8 MB 274.1 MB/s eta 0:00:00[2022-10-19 23:21:30.259127] 
ERROR: Could not find a version that satisfies the requirement json (from versions: none)
ERROR: No matching distribution found for json
WARNING: You are using pip version 22.0.3; however, version 22.3 is available.
You should consider upgrading via the '/home/appuser/venv/bin/python -m pip install --upgrade pip' command.
Checking if Streamlit is installed
────────────────────────────────────────────────────────────────────────────────────────
[23:21:31] ❗️ installer returned a non-zero exit code
[23:21:31] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[23:23:06] ❗️ Streamlit server consistently failed status checks
[23:23:06] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.

Any guidance would be much appreciated!

Hi @janesp, welcome to the Streamlit Community! :wave: :partying_face:

The solution is to only include packages in your requirements file that are not distributed with a standard Python installation. i.e. packages not part of The Python Standard Library.

json is in The Python Standard Library, and hence must be excluded from requirements.txt:

Happy Streamlit-ing! :balloon:
Snehan

Veeery cool, many thanks! My first Streamlit app is now up and running :sunglasses:

1 Like

Love to see it :muscle: To many more apps to come :grin:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.