How to fix Python PIP issues in OS X 10.8 Mountain Lion

If you’ve recently upgraded to Mountain Lion and you’re trying to run the Python installer pip but you get an error message like this:

sudo easy_install -U pip

then you need to upgrade your version of pip to the latest. Fire up Terminal and enter this:

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/", line 2603, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: pip==1.1

Additionally, make sure you have the latest Xcode (v4.4) with Command Line Tools package installed.