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…
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
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
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 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.
Cookie settings
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.