Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No module named streamlit.__main__; ‘streamlit’ is a package and cannot be directly executed

Tags:

streamlit

When I try to deploy streamlit to heroku I get this below error. How can I fix it?

No module named streamlit.main; ‘streamlit’ is a package and cannot be directly executed

enter image description here

enter image description here

like image 966
MCoder Avatar asked Sep 20 '25 11:09

MCoder


2 Answers

I tried and this works for me:

python -m streamlit.cli run path/to/your/app.py
like image 132
Dali Tang Avatar answered Sep 22 '25 00:09

Dali Tang


This will work for you too.. python -m streamlit.cli iris_eda_app.py

like image 40
Bandham Manikanta Avatar answered Sep 22 '25 00:09

Bandham Manikanta