Understanding path/enviroments/streamlit

Viewed 654

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 Answers

Doc should say:> streamlit run app.py

try: python streamlit run hello

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

Related