I am trying to install a few different things and having issues.

I thought pip could have been the issue on one of the packages I was trying to install. So I decided to try to upgrade pip, following this reference:


So I ran :

sudo pip install -U pip

That output was:

Downloading/unpacking pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-6.1.1-py2.py3-none-any.whl#md5=172eb5abab25a5e0f7a7b63c7a49378d
  Downloading pip-6.1.1-py2.py3-none-any.whl (1.1MB): 1.1MB downloaded
Installing collected packages: pip
  Found existing installation: pip 1.5.4
    Uninstalling pip:
      Successfully uninstalled pip
Successfully installed pip
Cleaning up...

Now however when I run:

pip install <package>

I get:

"bash: /usr/bin/pip: No such file or directory"

What can I do to get the new pip working? (And hopefully not have to re-install all of the packages that the older version of pip had installed).

I am very new Ubuntu and to using pip.


I tried running:

easy_install pip

This gave me:

Searching for pip
Best match: pip 6.1.1
Adding pip 6.1.1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip3.4 script to /usr/local/bin
Installing pip3 script to /usr/local/bin

Using /usr/local/lib/python2.7/dist-packages
Processing dependencies for pip
Finished processing dependencies for pip

Still the pip command is not being recognized.

pip --version

bash: /usr/bin/pip: No such file or directory

More additional: I downloaded the get-pip.py and then ran python get-pip.py. This gave me an error something like "InsecurePlatformWarning"


Try using the package from the repository,

sudo apt-get install python-pip

If this gives you errors, you might first want to do a

sudo apt-get remove python-pip

and then try again with install.

This also shouldn't interfere or remove the modules you already installed.

  • The first line seems to have done the trick. Its working now. – wgwz Apr 23 '15 at 15:38

Once you have upgraded pip you only needed to update your link to your new pip on /usr/bin

sudo ln -s /usr/local/bin/pip /usr/bin/

since the old one has been removed when you upgrade the pip package using pip ;-)

Then, you are ready to go :)


This is merely an issue of bash remembering where executables are located. The Ubuntu python-pip package installs the pip executable to /usr/bin/pip, but anything installed via pip goes to /usr/local, meaning it installs the pip executable to /usr/local/bin/pip. However, bash remembers that the command pip is located at /usr/bin/pip, because it has looked up the command before, and tries to execute that without actually searching the path.

You can fix this by running hash -r in all open bash shells, or by opening a new shell, or rebooting. Reinstalling the Ubuntu python-pip package means you will have two different versions of pip installed simultaneously - but /usr/local will be used before /usr, so it ends up working. It's just not an efficient way to do things. :)

  • I like your certainty, but I actually still have a /usr/bin/pip in addition to /usr/local/bin/pip, for whatever reason. So folks should check that it actually exists. Run which -a pip and type pip to see how many there are, and if it's actually "remembering" the old location. – Andrew Backer Jan 17 '16 at 13:49
  • The OP did not have a /usr/bin/pip. Installing the python-pip package, which installs /usr/bin/pip, "fixed" the OP's issue. – Ryan P Apr 12 '16 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.