pip is apparently installed but not working

26,102

Installing pip with apt should not be the answer.

You installed PIP right, but you have to add the executable path to you PATH variable,

export PATH=~/.local/bin:$PATH

You can add this to the end of ~/.profile to make the change permanent. You may need to run source ~/.profile in a new shell, or you can log out and back in.

Share:
26,102

Related videos on Youtube

kingledion
Author by

kingledion

I write not-cutting edge software and daydream at work about writing cutting edge software.

Updated on September 18, 2022

Comments

  • kingledion
    kingledion almost 2 years

    As background, I am trying to back out of my anaconda distro and use pip to do my own package management. I had an old anaconda version 3.4 which I have deleted. I upgraded python to 3.5 alongside Ubuntu 16.04 and am in the process of re-installing all the rest of the packages that I use.

    Here is my problem with pip, in a nutshell.

    :~/Downloads$ python --version
    Python 3.5.2
    :~/Downloads$ python get-pip.py
    Requirement already up-to-date: pip in /home/XXX/.local/lib/python3.5/site-packages
    :~/Downloads$ pip install -U pip
    The program 'pip3' is currently not installed. You can install it by typing:
    sudo apt install python3-pip
    :~/Downloads$ pip install scipy
    The program 'pip3' is currently not installed. You can install it by typing:
    sudo apt install python3-pip
    

    Now, the apt install pip does in fact work. But then I have myriad problems with that version of pip that I have not experienced before, foremost among which is the fact that I can't install the apt managed pip to 9.0.1 from 8.1.1. So I apt removed pip and am now back to square one.

    But all that is irrelevant, I want to get pip working as is. What is going wrong with get-pip.py?

  • kingledion
    kingledion over 7 years
    pip is not installed. 'which pip' gives nothing, and 'pip --version' gives the same error message as seen with any other pip command. My question is why get-pip.py thinks that it has successfully installed pip yet I can't find run it.
  • aidanmelen
    aidanmelen over 7 years
    did you try <sudo apt install python3-pip>?
  • kingledion
    kingledion over 7 years
    I did, and I do not want to install it that way. If the pip install page says that the preferred way is to install it by running their installer, than that is what I should do. If I can't do that, something is wrong.
  • aidanmelen
    aidanmelen over 7 years
    i wouldn't install pip with get-pip.py when you could use apt.
  • edwinksl
    edwinksl about 7 years
    To note is that new user accounts from Ubuntu 16.04 onwards would already have $HOME/.local/bin in PATH. See the last line of .profile in gist.github.com/edwinksl/….