Understanding path/enviroments/streamlit

1.6k views Asked by At

Is there a primer anywhere for learning and understanding how this works?

Usually, when I install a package I just use pip, or the installer in pycharm.

I found myself very confused at trying to run streamlit. I've lost a day trying to figure it out

https://docs.streamlit.io/en/stable/

The instructions simply:

pip install streamlit

streamlit hello

I had a 32 bit of python recently and I replaced it with a 64 bit. Is that causing the python38-32 vs Python38 error below?

Fatal error in launcher: Unable to create process using ‘“c:\users\user\appdata\local\programs\python\python38-32\python.exe” “C:\Users\user\AppData\Local\Programs\Python\Python38\Scripts\streamlit.exe” hello’: The system cannot find the file specified.

I tried:

 C:\Users\user>python -m streamlit hello
C:\Users\user\AppData\Local\Programs\Python\Python38\python.exe: No module named streamlit.__main__; 'streamlit' is a package and cannot be directly executed

I'm not sure where it's getting this from:

local\programs\python\python38-32\python.exe

That doesn't exist, I only have:

Local\Programs\Python\Python38\

And that's what's in the path for windows

I’m wondering if anyone could help. Thanks

3

There are 3 answers

1
I value -u 2 On

Doc should say:> streamlit run app.py

try: python streamlit run hello

3
Competency Test On

If you're using Windows OS, you may try the steps below:

  1. First, you need to download Anaconda: https://www.anaconda.com/

  2. Open the Anaconda PowerShell Prompt and type the following:

    conda list

    pip uninstall streamlit

  3. Then, create a new environment, and test out the following:

    pip install streamlit

    streamlit hello

  4. Finally, you can test out streamlit on your code, replace your_app with the actual name of your file. Make sure you are in the same directory as your source code file.

    streamlit run your_app.py

0
Ravikar Chinnapapannagari On

This happened to me to. I used the anaconda prompt instead of the windows cmd:

  1. Install anaconda cmd prompt
  2. make an environment
  3. use "activate " for me I simply used streamlit.
  4. pip install streamlit
  5. type in "streamlit hello" NOT "streamlit run hello" 6: This website may help to no python at "C:\Users\AccountName\AppData\Local\Programs\Python\Python38-32\python.exe" error in VsCode