bash: pip: command not found

I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found".

This is on Mac OS X, which I'm new too, so I'm assuming there's some kind of path setting that was not set correctly when I ran setup.py. How can I investigate further? What do I need to check to get a better idea of the exact cause of the problem?

EDIT: I also tried installing Python 2.7 for Mac in the hopes that the friendly install process would do any housekeeping like editing PATH and whatever else needs to happy for everything to work according to the tutorials, but this didn't work. After installing is running 'python' still ran Python 2.6 and PATH was not updated.


Why not just do sudo easy_install pip or if this is for python 2.6 sudo easy_install-2.6 pip?

This installs pip using the default python package installer system and saves you the hassle of manual set-up all at the same time.

This will allow you to then run the pip command for python package installation as it will be installed with the system python. I also recommend once you have pip using the virtualenv package and pattern. :)


2020 Update:

For current Debian/Ubuntu, use

apt-get install python3-pip

to install pip3.


Old 2013 answer (easy_install is now deprecated):

Use setuptools to install pip: sudo easy_install pip

(I know the above part of my answer is redundant with klobucar's, but I can't add comments yet), so here's an answer with a solution to sudo: easy_install: command not found on Debian/Ubuntu: sudo apt-get install python-setuptools

Also, for python3, use easy_install3 and python3-setuptools.

For Python 3, use apt-get install python3-pip.


First of all: try pip3 instead of pip. Example:

pip3 --version
pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6)

pip3 should be installed automatically together with Python3.x. The documentation hasn't been updated, so simply replace pip by pip3 in the instructions, when installing Flask for example.

Now, if this doesn't work, you might have to install pip separately.