2

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 Answers3

0

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
-1

Doc should say:> streamlit run app.py

try: python streamlit run hello

I value -u 2
  • 107
  • 1
  • 4
-1

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

Competency Test
  • 121
  • 2
  • 6
  • What's the purpose of step 2? Also, using miniconda would be more convenient here. – Jan Wilamowski Oct 07 '21 at 06:34
  • Both Anaconda and Miniconda use Conda as the package manager. Both would work. Miniconda comes only with the package manager. However, you might as well install Anaconda since it comes pre-installed with packages. – Competency Test Oct 07 '21 at 07:31
  • I'm aware of that but Anaconda comes with loads of things OP doesn't need. Hence my remark about convenience. I also don't see why you would uninstall a previous version of streamlit. – Jan Wilamowski Oct 07 '21 at 07:33