My application stopped working since yesterday. I see the following error message:
Traceback (most recent call last):
File "/home/adminuser/venv/bin/streamlit", line 5, in <module>
from streamlit.web.cli import main
File "/home/adminuser/venv/lib/python3.12/site-packages/streamlit/__init__.py", line 55, in <module>
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File "/home/adminuser/venv/lib/python3.12/site-packages/streamlit/delta_generator.py", line 43, in <module>
from streamlit.elements.arrow_altair import ArrowAltairMixin
File "/home/adminuser/venv/lib/python3.12/site-packages/streamlit/elements/arrow_altair.py", line 36, in <module>
from altair.vegalite.v4.api import Chart
ModuleNotFoundError: No module named 'altair.vegalite.v4'
WARNING: Package(s) not found: streamlit-nightly
Couldn't find Streamlit version.
Installing rich for an improved exception logging
Using uv pip install.
Using Python 3.12.12 environment at /home/adminuser/venv
Audited [2026-01-22 12:06:53.919282] 1 package in 3ms
My recent changes to the application should not have affected any of this. And it is working fine locally. It appears that the failure is in installing a dependency that I don’t even directly use with my app.
I tried changing the python version from the default 3.13 to 3.12 without any use. How can I address this?
Hey there, thanks for reaching out to the community! This is a common issue when deploying Streamlit apps, especially with the error ModuleNotFoundError: No module named ‘altair.vegalite.v4’. Even if you don’t directly use Altair, Streamlit depends on it for some charting features, and the version compatibility between Streamlit and Altair is crucial.
To fix this, you should explicitly add altair<5 to your requirements.txt file if you’re using a Streamlit version older than 1.20.0. For newer Streamlit versions (1.23.0+), Altair v5 is supported, so you can use a newer Altair version or upgrade Streamlit. After updating requirements.txt, reboot your app. For more details, see the official guidance at the bottom of the Streamlit Community Cloud status page and related forum discussions.
Apparently I am using streamlit-1.19.0 but I never specified which version of streamlit to use. It is the default version that the deployment process chooses. Other than explicitly adding a version to requirements, is there anything I can do? Why is streamlit community cloud defaulting to such an outdated version?
All else being equal, Community Cloud should default to the latest version of Streamlit. If you are getting an older version of Streamlit without specifying an older version, I would hazard a guess that when uv is resolving your dependencies in their entirety, something is causing the version to downgrade. Please can you share your requirements file and the complete logs from your Cloud Console that show the installation messages?