Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

sudo easy_install pip

Searching for pip
Best match: pip 1.4.1
Processing pip-1.4.1-py2.7.egg
pip 1.4.1 is already the active version in easy-install.pth
Installing pip script to /home/nyzlfc/.local/bin
Installing pip-2.7 script to /home/nyzlfc/.local/bin
Using /home/nyzlfc/.local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

And then when I run

sudo pip install -U pyyaml nltk

I get:

sudo: pip: command not found
share|improve this question

2 Answers 2

Your pip is installed in /home/nyzlfc/.local/bin, which is not in the sudo path and with a good reason. Just add ~/.local/bin to your path and step away of sudo as it's unnecessary.

share|improve this answer

If you install pip from the Ubuntu repositories pip will work with sudo (I have used pip this way on 12.04 through to 14.04).

sudo apt-get install python-pip

share|improve this answer
You dont always need to use sudo to install python modules. you can scope them to your user using pip install --user ipdb (for example) - from there, they are installed to ~/.local/lib/python-ver/ and the bins are placed in ~/.local/bin/ so add ~/.local/bin to your $PATH and you're g2g with non-sudo use of pip. –  lazyPower Jun 26 '14 at 0:09
Good point, I was working on the fact the question was using sudo, that installing with sudo was desired. I generally do as my code is used by different users on the same system –  NGRhodes Jun 26 '14 at 10:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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