Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ModuleNotFoundError: No module named 'streamlit.cli'

I have an error when I deploy streamlit app on Heroku. How can I deal with ?

something error like this

like image 737
Jim Ya Avatar asked Apr 13 '26 10:04

Jim Ya


2 Answers

This happens when you Install multiple streamlit packages from different folders like when you cloned a project and you install their requirements in your global environment In this case best possible thing that can be done is to uninstall streamlit dependencies present in your system by

pip uninstall streamlit

The install it again using,

pip install streamlit

It should remove all the conflicts and your application should work now. and remember to install the new requirements in your virtual environment if you install all the requirements in your global environments these conflicts occur.

then simply run streamlit run command using

streamlit run app.py

All things should work fine now.

like image 157
Puranjay Kwatra Avatar answered Apr 15 '26 23:04

Puranjay Kwatra


Try upgrading streamlit (this worked for me)

pip install --upgrade streamlit

Otherwise reinstall

pip uninstall streamlit
pip install streamlit
like image 31
noobie Avatar answered Apr 16 '26 00:04

noobie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!