Command not found

i don’t know where is the problem i have been installed streamlit succesfully.

Hey @Cellule_Boukham :wave:,

If I’m reading your screenshot correctly, this looks like a Python environment issue, where for some reason the streamlit executable is not in your $PATH. Can you post a few pieces of data to help debug?

  1. How exactly did you install Streamlit?

    • pip install streamlit
    • pip3 install streamlit
    • sudo pip install streamlit
    • pip install streamlit --user
    • Something else?
  2. Can you post the output of these commands?

    $ echo $PATH
    $ which python
    $ which streamlit
  1. What do you get when you try this:
    $ python    # (or python3 if you used pip3)
    >>> import streamlit
    >>> streamlit.__file__
1 Like

Hi, I have the same issue, I’ll be glad for any advice. I’m using conda for env managment. To answer your questions above:

  1. I’ve installed it using pip3 (however I tried using pip before)
  2. echo $PATH

$ which python

$ which streamlit

  1. returns:
1 Like

Hi @emal

From the data you posted, my guess is that when you pip-installed Streamlit you weren’t inside your Conda environment. I say this because your Streamlit was installed in ~/.local/lib/... rather than in ~/anaconda3/envs/....

So try this:

# Remove Streamlit from your local Python installation.
conda deactivate
pip uninstall streamlit

# Activate the Conda environment and install Streamlit.
conda activate envName  # Replace with the name of your environment
pip install streamlit

Hi, thanks for the effort @thiago. That would be a logical assumption. However, when installing streamlit I was already in the environment, that’s why I’m not sure why it gets installed outside. But after your comment, at least I know it should work this way, so I’ll try to fix it somehow.

Hi thiago, I have the same issue, I’ll be glad for any advice. I’m using Python 3.7. To answer your questions above:
1 I’ve installed it using " pip install streamlit "
2 echo $PATH
/media/felipe/SAMSUNG/LAPTOP RECENTE/felipe/Python3.7/Semana de Data Science/aula03/aula03

               which python:

                which streamlit

            Python 3.7.1 (default, Dec 14 2018, 19:28:38) 

[GCC 7.3.0] :: Anaconda, Inc. on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import streamlit

That’s it. As I see, I managed to install streamlit both in my /home address and in the $PATH written above, but unfortunately the “streamlit” command has not been found. How can I solve this problem?

Experienced the same problem. I got it to work by adding

export PATH="$HOME/.local/bin:$PATH"

to my .zprofile


@Roberto this solve my same issue, but temporarily means once I close the terminal, after reopen I need to do the same. Can U plz explain in detail how to get a permanent solution. Thanks

1 Like

Oh right source /.zprofile after adding the export line

1 Like

Thanks but not working. :frowning_face:

1 Like

Thank you!! This worked

Nevermind… this was not the right thing to do. This gave me even more issues, I had to fix with someone more knowledgable than myself later on… Do not follow this advice!!!