I was trying to build a streamlit app. Performed the following steps:
Activated my own environment using Ananconda prompt
Installed streamlit using pip install streamlit
Once installation is done, typed following command: streamlit hello
Got the error “‘streamlit’ is not recognized as an internal or external command,
operable program or batch file.”
Please help, what exactly am I missing.
Hi
@NitinKaushik
, sorry to hear you’re having installation issues!
I can’t reproduce your bug on my machine, so can you provide a bit more info so we can help debug?
What operating system are you using? Also what OS version? What Conda version? What Python version?
For steps (1) and (2) you posted above, can you provide the exact sequence of commands you used? For example:
conda create --name myenv
conda activate myenv
pip install streamlit
Following are the details:
I’m using Windows 10 OS, conda version is 4.7.12, Python version is 3.6.9
Here are the sequence of steps:
–>First I created a fresh environment (say myenv) by going on to the Environment section of Anaconda Navigator
–> Then I opened the Anaconda prompt and activate the myenv using command activate myenv
–> Then I typed pip install streamlit
–> As suggested on your website, I then typed streamlit hello command to validate the installation.
–> Got the error “‘streamlit’ is not recognized as an internal or external command,
operable program or batch file.”
Hmmm… I just went through the exact steps above and was able to run Streamlit on a brand new Windows VM.
My guess is Streamlit is blocked from connecting to a TCP port on your machine, but I don’t know Windows enough to know how to unblock it. I’ll keep investigating…
Facing the same issue as mentioned above.
getting following warning while installation can this be the reason of the issue-
Installing collected packages: base58, validators, blinker, toml, future, streamlit
** WARNING: The script base58.exe is installed in ‘C:\Users\lenovo\AppData\Roaming\Python\Python36\Scripts’ which is not on PATH.**
** Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.**
** WARNING: The scripts futurize.exe and pasteurize.exe are installed in ‘C:\Users\lenovo\AppData\Roaming\Python\Python36\Scripts’ which is not on PATH.**
** Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.**
** WARNING: The script streamlit.exe is installed in ‘C:\Users\lenovo\AppData\Roaming\Python\Python36\Scripts’ which is not on PATH.**
** Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.**
Successfully installed base58-1.0.3 blinker-1.4 future-0.18.0 streamlit-0.48.1 toml-0.10.0 validators-0.14.0
your system have two python installation one with anaconda and one directly, so when you are pip installing streamlit, it is being installed in the site-package of python 3.6 rather than anaconda’s python interpreter it could be possible if your environment is not properly activated. you can check “pip --version” and it will point out from where this pip is running if it shows the path to python intrepreter from python36 and not from anaconda then the issue is with the python installation you can try to install python from system as anaconda has its own python intrepreter
anaconda already runs in a (base) virtualenv so incase you create your own venv
it should show something like this
(base) (myvenv) then it should work
Thanks for your response imneonizer. After doing pip --version. I got the response as “pip 19.2.2 from Directory_Path\Anaconda3\lib\site-packages\pip (python 3.6)” so not sure if this is fine.
Also to your second response: When I activate my own environment then I get prefix as (myvenv) and not (base)((myvenv). (base) gets converted into (myenv) only
Hey
@NitinKaushik
, I had the same issue when installing Streamlit, hope this can solve your problem
As you see in the Warning message while installing Streamlit, you need to add that folder to your enviromental path
-You can search on Windows icon in the bottom left
environment variables for your account
-on PATH variable click edit
-Click on NEW and add the folder from the warning message with a semicolon in front
-in your case ;C:\Users\lenovo\AppData\Roaming\Python\Python36\Scripts
With this step I was able to run streamlit directly from my Anaconda console.
In case any issue, you can google how to add Python to your Windows PATH, note that Anaconda has a different PATH and you may need to add it as well, can’t confirm
I’m trying to use streamlit on windows. No luck. Get the same error.
Copy streamlit files in C:\Users\AppData\Roaming\Python\Python36\Scripts and paste them into
your C:\ProgramData\Anaconda3\Scripts and run your streamlit code in anaconda prompt
Hope this works for you…
I was getting the same error.
The thing is, it has been installed in pip, but not in conda.
Try verifying with
conda list
Then do this -
pip uninstall streamlit
pip list (you’ll see its not in the list anymore)
Then create a new environment, activate the environment and then
pip install streamlit
streamlit hello
I tried
pip list
and
conda list
.An in both of them streamlit is there.
But when I am trying to run my .py file from cmd its saying
'streamlit' is not recognized as an internal or external command, operable program or batch file.
but when I am running through anaconda prompt its running very well.
And I did
pip --version
and it throws this
pip 20.2.1 from c:\python38\lib\site-packages\pip (python 3.8)
.
Dont know why this thing is happening. Any solution guys?
This is for pip
I had this problem tonight on Windows 10. Streamlit was already working great in a different conda environment, so I knew I must have done something wrong creating the new environment.
Following the advice above of checking the pip version I realized that conda was using the default install of python.
Problem found! Not specifying a python version when creating the conda environment causes conda to use the system version.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.