Installing Streamlit using Anaconda and running it in Windows 10

Summary

I have installed streamlit to a new env (Python_Streamlit) as per instruction. Everything seems to be okay - I checked on a terminal running python and importing streamlit. However when I try run a scrpt file called main.py with a very basic statement to import streamlit and run 3-4 statements. I get the follwowing error message. Being a newcomer to streamlit, these all seems totally strange to me. Could someone help me resolve this issue please?

"(Python_Streamlit) C:\Users\olall>streamlit run main.py
Traceback (most recent call last):
File β€œC:\Users\olall.conda\envs\Python_Streamlit\Scripts\streamlit-script.py”, line 5, in
from streamlit.cli import main
File β€œC:\Users\olall.conda\envs\Python_Streamlit\Lib\site-packages\streamlit_init_.py”, line 70, in
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File β€œC:\Users\olall.conda\envs\Python_Streamlit\Lib\site-packages\streamlit\delta_generator.py”, line 73, in
from streamlit.elements.arrow_altair import ArrowAltairMixin
File β€œC:\Users\olall.conda\envs\Python_Streamlit\Lib\site-packages\streamlit\elements\arrow_altair.py”, line 25, in
from altair.vegalite.v4.api import Chart
ModuleNotFoundError: No module named β€˜altair.vegalite.v4’ "

Steps to reproduce

Code snippet:

import streamlit as st


header = st.container()
dataset = st.container()
features = st.container()
modelTraining = st.container()

with header:
	st.title('Welcometo my awesome data science project')

``

**Expected behavior:**

I expected a a browser to open with the title printed "Welcome to my awesome data science project"


**Actual behavior:**

See error message above!

### Debug info

- Streamlit version: (latest)
- Python version: (latest)
- Using Conda
 OS version: Windows 10

Install altair<5.

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