broken easy_install and pip after upgrading to OS X Mavericks broken easy_install and pip after upgrading to OS X Mavericks python python

broken easy_install and pip after upgrading to OS X Mavericks


  1. Install easy_install:

    Download ez_setup.py module from https://pypi.python.org/pypi/setuptools

    $ cd path/to/ez_setup.py$ python ez_setup.py
  2. Install pip:

    $ sudo easy_install pip


I ran into a similar problem with git-review.

$ git review -sTraceback (most recent call last):  File "/usr/local/bin/git-review", line 11, in <module>    sys.exit(main())  File "/Library/Python/2.7/site-packages/git_review/cmd.py", line 1132, in main    (os.path.split(sys.argv[0])[-1], get_version()))  File "/Library/Python/2.7/site-packages/git_review/cmd.py", line 180, in get_version    provider = pkg_resources.get_provider(requirement)  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 197, in get_provider    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require    needed = self.resolve(parse_requirements(requirements))  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve    raise DistributionNotFound(req)  # XXX put more info herepkg_resources.DistributionNotFound: git-review

The git-review team said it was a bug with pkg_resources that could be fixed with

sudo pip install --upgrade setuptools

This worked fine for me.