Support for Altair.v5?


Streamlit seems to require Altair.v4 so not working with v5?

Steps to reproduce

Code snippet:

pip install altair==5.0.0rc1

streamlit run        

Traceback (most recent call last):
  File "/usr/local/bin/streamlit", line 5, in <module>
    from streamlit.web.cli import main
  File "/usr/local/lib/python3.9/site-packages/streamlit/", line 55, in <module>
    from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
  File "/usr/local/lib/python3.9/site-packages/streamlit/", line 45, in <module>
    from streamlit.elements.arrow_altair import ArrowAltairMixin
  File "/usr/local/lib/python3.9/site-packages/streamlit/elements/", line 36, in <module>
    from altair.vegalite.v4.api import Chart
ModuleNotFoundError: No module named 'altair.vegalite.v4'

Expected behavior:
Any way we can use altair.v5 with Streamlit or when can we expect support for altair.v5?

Debug info

  • Streamlit, version 1.16.0
  • Python 3.10.9

It’s only a RC, was released only 5 days ago and has no official release yet, so maybe you’re expecting a bit too much?

Thanks, no problems, a long shot so expectations are low :slight_smile: Just some new nice features in v5 I’l like to use and a manual install of v5 is too messy.

Hi, we are aware that altair v5 is not going to work with streamlit as of right now: