Issue #228 wontfix

distribute breaks system python on OS X 10.7

created an issue

I installed distribute via 'pip install distribute'. I later needed to uninstall my python packages, so 'rm -rf /Library/Python/2.7/site-packages/*'. Then tried to sudo easy_install pip. I got the error below.

Looking in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/ I find that distribute has altered several files -- setuptools, the setuptools egg, and This shouldn't happen for two reasons:

a) /System is managed by the OS, and shouldn't be messed with by non-OS tools.

b) Removing site-packages/ ought to be a safe operation, but since distribute has altered both /Library/Python/2.7/site-packages/ and /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/*, getting rid of user-installed packages leaves the python installation in an inconsistent state.

Traceback (most recent call last): File "/usr/bin/easy_install-2.7", line 7, 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 File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/", line 565, in resolve pkg_resources.DistributionNotFound: setuptools==0.6c12dev-r85381

Comments (3)

  1. Lennart Regebro

    If you installed distribute with "pip install distribute" and an uninstall by "pip uninstall distribute" doesn't work, that might be a bug, but that's not what you did.

    The problem here is several things:

    1. You installed a bunch of packages, and then you only partially removed them by removing the package directories, but not the other things that also need to get changed to install a package.

    2. Distribute is a fork of setuptools. You in practice installed a newer version of setuptools, overwriting the system version, and then your bug report complains that it modified the system version. That's not a bug.

    3. Don't install things into the system python with non-system tools. On OS X that means: Leave the system python be. Use another Python for your servers and other software.

    Closed as not a bug.

  2. Log in to comment