Getting an error "'streamlit' is not recognized as an internal or external command, operable program or batch file."

Do you know how to solve this error if I don’t have Anaconda? Thank you very much!

1 Like

This worked a treat. I had to upgrade protobuf too as I was getting an attribute error. Thanks

2 Likes

thank you soo much :heart:

1 Like

Thank You , It worked!

1 Like

I used pip install in anaconda prompt and I was running this command in my command prompt, that’s why I was getting error. When I ran it on anaconda prompt my error was solved.

1 Like

Do not spend your time with direct streamlit command. Try to use python -m streamlit it will work.

10 Likes

Hi @Suat_ATAN, welcome to the Streamlit community! Can you clarify why you feel that python -m streamlit provides a better experience? The vast majority of people have no trouble using streamlit run app.py, even on Windows.

Best,
Randy

1 Like

Hi @randyzwitch, thanks. Of course, Let me explain: Direct commands like streamlit or flask sometimes causes error in the Windows environment because Windows PATH variables are not stable as Linux’ according to my experiences. Due to this, when any direct library-related commands isn’t work I am doing the same thing over python pipeline because it is already registered to Windows’ PATH. I don’t know why, it may be due to security configuration of my office computer Windows became problematic for most of command-line tasks.

6 Likes

That makes sense, thanks for clarifying!

1 Like

Thanks! I have the same problem and that’s worked.

2 Likes

thanks… it was helpful

1 Like

Thanks. It worked for me.

1 Like

I solved the issue by doing this on Windows 10 :

py -m streamlit run filename.py
6 Likes

Thanks, it worked!

2 Likes
  1. cd on CMD to the location where your file.py is located.
  2. On the CMD, instead of typing streamlit run file.py type python -m streamlit run file.py
3 Likes

Hello friend, I’m using the commands infrmado and it runs but it doesn’t create the page, can you help?

1 Like

Thanks. it worked for me

1 Like

You are welcome!!!

1 Like

Thank you. That solved my problem.

1 Like
  • search “environment variables” in start button then klik environment variables >>> klik edit on PATH variable
  • klik NEW then add C:\Users*Your User*\AppData\Local\Programs\Python\Python39
  • klik NEW then add C:\Users\user\AppData\Local\Programs\Python\Python39\Scripts

open cmd
pip install streamlit
pipenv install streamlit

1 Like