1. Tarek Ziadé
  2. distribute
  3. Issues
Issue #113 open

Distribute fails on fresh OSX (10.6) system due to Sanboxviolation

Dane Springmeyer
created an issue

First time trying Distribute on a fresh machine. Sorry if I am missing something, but not a good experience and I figured I should report so that these problems are known.

I first, tried to install Distribute with pip, which did not work and now both setuptools and Distribute appear broken and I'm unable to uninstall Distribute.

Steps I took:

fresh os using Apple provided python 2.6

  • installed pip using Apple provided easy_install
  • then tried installing Distribute with easy_install, which did not work
  • then seemingly succeeded in installing Distribute with pip
  • then tried to install something (in this case nose) with pip (figuring it is now using Distribute in the background)
  • At this point both easy_install is broken and is unable to uninstall Distribute. see below

{{{

!dane:seven dane$ sudo easy_install pip

Searching for pip Reading http://pypi.python.org/simple/pip/ Reading http://pip.openplans.org Best match: pip 0.6.1 Downloading http://pypi.python.org/packages/source/p/pip/pip-0.6.1.tar.gz#md5=7560e3055c66afb99ac4a7892389a237 Processing pip-0.6.1.tar.gz Running pip-0.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-BbYX1V/pip-0.6.1/egg-dist-tmp-LkU5qI warning: no files found matching '.html' under directory 'docs' warning: no previously-included files matching '.txt' found under directory 'docs/_build' no previously-included directories found matching 'docs/_build/_sources' warning: no files found matching '*' under directory 'scripts/completion' zip_safe flag not set; analyzing archive contents... pip: module references file Adding pip 0.6.1 to easy-install.pth file Installing pip script to /usr/local/bin

Installed /Library/Python/2.6/site-packages/pip-0.6.1-py2.6.egg Processing dependencies for pip Finished processing dependencies for pip }}}

Failed: {{{ dane:seven dane$ sudo easy_install Distribute Searching for Distribute Reading http://pypi.python.org/simple/Distribute/ Reading http://packages.python.org/distribute Best match: distribute 0.6.10 Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz#md5=99fb4b3e4ef0861bba11aa1905e89fed Processing distribute-0.6.10.tar.gz Running distribute-0.6.10/setup.py -q bdist_egg --dist-dir /tmp/easy_install-1I7gCu/distribute-0.6.10/egg-dist-tmp-hWlJe5 Before install bootstrap. Scanning installed packages Setuptools installation detected at /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python Non-egg installation Removing elements out of the way... Renaming /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools-0.6c9-py2.6.egg-info into /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools-0.6c9-py2.6.egg-info.OLD.1263157334.17 error: SandboxViolation: mkdir('/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools-0.6c9-py2.6.egg-info',) {}

The package setup script has attempted to modify files on your system that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not support alternate installation locations even if you run its setup script by hand. Please inform the package's author and the EasyInstall maintainers to find out if a fix or workaround is available. }}}

Worked: {{{ dane:seven dane$ sudo pip install Distribute Downloading/unpacking Distribute Downloading distribute-0.6.10.tar.gz (385Kb): 385Kb downloaded Running setup.py egg_info for package Distribute Installing collected packages: Distribute Running setup.py install for Distribute Before install bootstrap. Scanning installed packages No setuptools distribution found Installing easy_install script to /usr/local/bin Installing easy_install-2.6 script to /usr/local/bin After install bootstrap. Creating /Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg-info Creating /Library/Python/2.6/site-packages/setuptools.pth Successfully installed Distribute

}}}

Fails: {{{ dane:seven dane$ sudo pip install nose /usr/local/bin/pip:4: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Python/2.6/site-packages is being added to sys.path import pkg_resources /usr/local/bin/pip:4: UserWarning: Module site was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc, but /Library/Python/2.6/site-packages is being added to sys.path import pkg_resources Downloading/unpacking nose Downloading nose-0.11.1.tar.gz (250Kb): 250Kb downloaded Running setup.py egg_info for package nose /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/sdist.py:4: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Python/2.6/site-packages is being added to sys.path import os, re, sys, pkg_resources /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/sdist.py:4: UserWarning: Module setuptools was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/init.pyc, but /Library/Python/2.6/site-packages is being added to sys.path import os, re, sys, pkg_resources /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/sdist.py:4: UserWarning: Module site was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc, but /Library/Python/2.6/site-packages is being added to sys.path import os, re, sys, pkg_resources Traceback (most recent call last): File "<string>", line 14, in <module> File "/Users/dane/projects/mapnik-dev/seven/build/nose/setup.py", line 75, in <module> **addl_args File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 113, in setup _setup_distribution = dist = klass(attrs) File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/dist.py", line 223, in init _Distribution.init(self,attrs) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 270, in init self.finalize_options() File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/dist.py", line 256, in finalize_options ep.load()(self, ep.name, value) File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 1912, in load raise ImportError("%r has no %r attribute" % (entry,attr)) ImportError: <module 'setuptools.dist' from '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/dist.pyc'> has no 'check_packages' attribute Complete output from command python setup.py egg_info: /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/sdist.py:4: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Python/2.6/site-packages is being added to sys.path

import os, re, sys, pkg_resources

/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/sdist.py:4: UserWarning: Module setuptools was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/init.pyc, but /Library/Python/2.6/site-packages is being added to sys.path

import os, re, sys, pkg_resources

/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/sdist.py:4: UserWarning: Module site was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc, but /Library/Python/2.6/site-packages is being added to sys.path

import os, re, sys, pkg_resources

Traceback (most recent call last):

File "<string>", line 14, in <module>

File "/Users/dane/projects/mapnik-dev/seven/build/nose/setup.py", line 75, in <module>

**addl_args

File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 113, in setup

_setup_distribution = dist = klass(attrs)

File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/dist.py", line 223, in init

_Distribution.__init__(self,attrs)

File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 270, in init

self.finalize_options()

File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/dist.py", line 256, in finalize_options

ep.load()(self, ep.name, value)

File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 1912, in load

raise ImportError("%r has no %r attribute" % (entry,attr))

ImportError: <module 'setuptools.dist' from '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/dist.pyc'> has no 'check_packages' attribute


Command python setup.py egg_info failed with error code 1 Storing complete log in ./pip-log.txt }}}

Apple provided easy_install now broken: {{{ dane:seven dane$ sudo easy_install nose Traceback (most recent call last): File "/usr/bin/easy_install-2.6", line 7, in <module> from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 2560, in <module> parse_requirements(requires), Environment() File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 518, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: setuptools==0.6c9

Upgrading to dev Distribute will not work: {{{ dane:seven dane$ easy_install -U distribute==dev Traceback (most recent call last): File "/usr/bin/easy_install-2.6", line 7, in <module> from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 2560, in <module> parse_requirements(requires), Environment() File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 518, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: setuptools==0.6c9 }}}

Can't uninstall Distribute: {{{ dane:seven dane$ easy_install -m Distribute Traceback (most recent call last): File "/usr/bin/easy_install-2.6", line 7, in <module> from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 2560, in <module> parse_requirements(requires), Environment() File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 518, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: setuptools==0.6c9 }}}

Comments (6)

  1. Tarek Ziadé repo owner
    • changed status to open

    I'll investigate in your log. Until then you can get back on track by running:

    $ curl -o http://python-distribute.org/distribute_setup.py
    $ python2.6  distribute_setup.py
    
  2. Dane Springmeyer reporter

    great! thank you!

    $ curl -O http://python-distribute.org/distribute_setup.py $ sudo python2.6 distribute_setup.py $ sudo pip install nose

    Worked!

    Log below:

    $ curl -o http://python-distribute.org/distribute_setup.py
    curl: no URL specified!
    curl: try 'curl --help' or 'curl --manual' for more information
    dane:seven dane$ curl -O http://python-distribute.org/distribute_setup.py
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 15285  100 15285    0     0  15900      0 --:--:-- --:--:-- --:--:-- 20967
    dane:seven dane$ python2.
    python2.5         python2.5-config  python2.6         python2.6-config  
    dane:seven dane$ python2.6 distribute_setup.py 
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz
    Extracting in /var/folders/vC/vCkzLwkoGlO6b78KTUPPWE+++TI/-Tmp-/tmpjs7Y0M
    Now working in /var/folders/vC/vCkzLwkoGlO6b78KTUPPWE+++TI/-Tmp-/tmpjs7Y0M/distribute-0.6.10
    Installing Distribute
    Before install bootstrap.
    Scanning installed packages
    Setuptools installation detected at /Library/Python/2.6/site-packages
    Non-egg installation
    Removing elements out of the way...
    Already patched.
    /Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg-info already patched.
    running install
    running bdist_egg
    running egg_info
    writing distribute.egg-info/PKG-INFO
    writing top-level names to distribute.egg-info/top_level.txt
    writing dependency_links to distribute.egg-info/dependency_links.txt
    writing entry points to distribute.egg-info/entry_points.txt
    reading manifest file 'distribute.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'distribute.egg-info/SOURCES.txt'
    installing library code to build/bdist.macosx-10.6-universal/egg
    running install_lib
    running build_py
    creating build
    creating build/lib
    copying pkg_resources.py -> build/lib
    copying easy_install.py -> build/lib
    copying site.py -> build/lib
    creating build/lib/setuptools
    copying setuptools/__init__.py -> build/lib/setuptools
    copying setuptools/archive_util.py -> build/lib/setuptools
    copying setuptools/depends.py -> build/lib/setuptools
    copying setuptools/dist.py -> build/lib/setuptools
    copying setuptools/extension.py -> build/lib/setuptools
    copying setuptools/package_index.py -> build/lib/setuptools
    copying setuptools/sandbox.py -> build/lib/setuptools
    creating build/lib/setuptools/command
    copying setuptools/command/__init__.py -> build/lib/setuptools/command
    copying setuptools/command/alias.py -> build/lib/setuptools/command
    copying setuptools/command/bdist_egg.py -> build/lib/setuptools/command
    copying setuptools/command/bdist_rpm.py -> build/lib/setuptools/command
    copying setuptools/command/bdist_wininst.py -> build/lib/setuptools/command
    copying setuptools/command/build_ext.py -> build/lib/setuptools/command
    copying setuptools/command/build_py.py -> build/lib/setuptools/command
    copying setuptools/command/develop.py -> build/lib/setuptools/command
    copying setuptools/command/easy_install.py -> build/lib/setuptools/command
    copying setuptools/command/egg_info.py -> build/lib/setuptools/command
    copying setuptools/command/install.py -> build/lib/setuptools/command
    copying setuptools/command/install_egg_info.py -> build/lib/setuptools/command
    copying setuptools/command/install_lib.py -> build/lib/setuptools/command
    copying setuptools/command/install_scripts.py -> build/lib/setuptools/command
    copying setuptools/command/register.py -> build/lib/setuptools/command
    copying setuptools/command/rotate.py -> build/lib/setuptools/command
    copying setuptools/command/saveopts.py -> build/lib/setuptools/command
    copying setuptools/command/sdist.py -> build/lib/setuptools/command
    copying setuptools/command/setopt.py -> build/lib/setuptools/command
    copying setuptools/command/test.py -> build/lib/setuptools/command
    copying setuptools/command/upload.py -> build/lib/setuptools/command
    copying setuptools/command/upload_docs.py -> build/lib/setuptools/command
    creating build/lib/setuptools/tests
    copying setuptools/tests/__init__.py -> build/lib/setuptools/tests
    copying setuptools/tests/doctest.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_build_ext.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_develop.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_easy_install.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_packageindex.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_resources.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_sandbox.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_upload_docs.py -> build/lib/setuptools/tests
    copying setuptools/cli.exe -> build/lib/setuptools
    copying setuptools/gui.exe -> build/lib/setuptools
    creating build/bdist.macosx-10.6-universal
    creating build/bdist.macosx-10.6-universal/egg
    copying build/lib/easy_install.py -> build/bdist.macosx-10.6-universal/egg
    copying build/lib/pkg_resources.py -> build/bdist.macosx-10.6-universal/egg
    creating build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/__init__.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/archive_util.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/cli.exe -> build/bdist.macosx-10.6-universal/egg/setuptools
    creating build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/__init__.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/alias.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/bdist_egg.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/bdist_rpm.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/bdist_wininst.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/build_ext.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/build_py.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/develop.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/easy_install.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/egg_info.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/install.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/install_egg_info.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/install_lib.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/install_scripts.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/register.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/rotate.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/saveopts.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/sdist.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/setopt.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/test.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/upload.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/upload_docs.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/depends.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/dist.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/extension.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/gui.exe -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/package_index.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/sandbox.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    creating build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/__init__.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/doctest.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_build_ext.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_develop.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_easy_install.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_packageindex.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_resources.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_sandbox.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_upload_docs.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/site.py -> build/bdist.macosx-10.6-universal/egg
    byte-compiling build/bdist.macosx-10.6-universal/egg/easy_install.py to easy_install.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/pkg_resources.py to pkg_resources.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/__init__.py to __init__.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/archive_util.py to archive_util.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/__init__.py to __init__.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/alias.py to alias.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/bdist_egg.py to bdist_egg.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/bdist_rpm.py to bdist_rpm.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/bdist_wininst.py to bdist_wininst.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/build_ext.py to build_ext.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/build_py.py to build_py.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/develop.py to develop.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/easy_install.py to easy_install.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/egg_info.py to egg_info.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/install.py to install.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/install_egg_info.py to install_egg_info.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/install_lib.py to install_lib.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/install_scripts.py to install_scripts.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/register.py to register.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/rotate.py to rotate.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/saveopts.py to saveopts.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/sdist.py to sdist.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/setopt.py to setopt.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/test.py to test.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/upload.py to upload.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/upload_docs.py to upload_docs.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/depends.py to depends.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/dist.py to dist.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/extension.py to extension.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/package_index.py to package_index.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/sandbox.py to sandbox.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/__init__.py to __init__.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/doctest.py to doctest.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_build_ext.py to test_build_ext.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_develop.py to test_develop.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_easy_install.py to test_easy_install.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_packageindex.py to test_packageindex.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_resources.py to test_resources.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_sandbox.py to test_sandbox.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_upload_docs.py to test_upload_docs.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/site.py to site.pyc
    creating build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/PKG-INFO -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/entry_points.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/entry_points.txt.orig -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/top_level.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/zip-safe -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    creating dist
    creating 'dist/distribute-0.6.10-py2.6.egg' and adding 'build/bdist.macosx-10.6-universal/egg' to it
    removing 'build/bdist.macosx-10.6-universal/egg' (and everything under it)
    Processing distribute-0.6.10-py2.6.egg
    creating /Library/Python/2.6/site-packages/distribute-0.6.10-py2.6.egg
    Extracting distribute-0.6.10-py2.6.egg to /Library/Python/2.6/site-packages
    Adding distribute 0.6.10 to easy-install.pth file
    error: /Library/Python/2.6/site-packages/easy-install.pth: Permission denied
    Something went wrong during the installation.
    See the error message above.
    dane:seven dane$ sudo python2.6 distribute_setup.py 
    Password:
    Extracting in /tmp/tmpE4BkqV
    Now working in /tmp/tmpE4BkqV/distribute-0.6.10
    Installing Distribute
    Before install bootstrap.
    Scanning installed packages
    Setuptools installation detected at /Library/Python/2.6/site-packages
    Non-egg installation
    Removing elements out of the way...
    Already patched.
    /Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg-info already patched.
    running install
    running bdist_egg
    running egg_info
    writing distribute.egg-info/PKG-INFO
    writing top-level names to distribute.egg-info/top_level.txt
    writing dependency_links to distribute.egg-info/dependency_links.txt
    writing entry points to distribute.egg-info/entry_points.txt
    reading manifest file 'distribute.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'distribute.egg-info/SOURCES.txt'
    installing library code to build/bdist.macosx-10.6-universal/egg
    running install_lib
    running build_py
    creating build
    creating build/lib
    copying pkg_resources.py -> build/lib
    copying easy_install.py -> build/lib
    copying site.py -> build/lib
    creating build/lib/setuptools
    copying setuptools/__init__.py -> build/lib/setuptools
    copying setuptools/archive_util.py -> build/lib/setuptools
    copying setuptools/depends.py -> build/lib/setuptools
    copying setuptools/dist.py -> build/lib/setuptools
    copying setuptools/extension.py -> build/lib/setuptools
    copying setuptools/package_index.py -> build/lib/setuptools
    copying setuptools/sandbox.py -> build/lib/setuptools
    creating build/lib/setuptools/command
    copying setuptools/command/__init__.py -> build/lib/setuptools/command
    copying setuptools/command/alias.py -> build/lib/setuptools/command
    copying setuptools/command/bdist_egg.py -> build/lib/setuptools/command
    copying setuptools/command/bdist_rpm.py -> build/lib/setuptools/command
    copying setuptools/command/bdist_wininst.py -> build/lib/setuptools/command
    copying setuptools/command/build_ext.py -> build/lib/setuptools/command
    copying setuptools/command/build_py.py -> build/lib/setuptools/command
    copying setuptools/command/develop.py -> build/lib/setuptools/command
    copying setuptools/command/easy_install.py -> build/lib/setuptools/command
    copying setuptools/command/egg_info.py -> build/lib/setuptools/command
    copying setuptools/command/install.py -> build/lib/setuptools/command
    copying setuptools/command/install_egg_info.py -> build/lib/setuptools/command
    copying setuptools/command/install_lib.py -> build/lib/setuptools/command
    copying setuptools/command/install_scripts.py -> build/lib/setuptools/command
    copying setuptools/command/register.py -> build/lib/setuptools/command
    copying setuptools/command/rotate.py -> build/lib/setuptools/command
    copying setuptools/command/saveopts.py -> build/lib/setuptools/command
    copying setuptools/command/sdist.py -> build/lib/setuptools/command
    copying setuptools/command/setopt.py -> build/lib/setuptools/command
    copying setuptools/command/test.py -> build/lib/setuptools/command
    copying setuptools/command/upload.py -> build/lib/setuptools/command
    copying setuptools/command/upload_docs.py -> build/lib/setuptools/command
    creating build/lib/setuptools/tests
    copying setuptools/tests/__init__.py -> build/lib/setuptools/tests
    copying setuptools/tests/doctest.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_build_ext.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_develop.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_easy_install.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_packageindex.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_resources.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_sandbox.py -> build/lib/setuptools/tests
    copying setuptools/tests/test_upload_docs.py -> build/lib/setuptools/tests
    copying setuptools/cli.exe -> build/lib/setuptools
    copying setuptools/gui.exe -> build/lib/setuptools
    creating build/bdist.macosx-10.6-universal
    creating build/bdist.macosx-10.6-universal/egg
    copying build/lib/easy_install.py -> build/bdist.macosx-10.6-universal/egg
    copying build/lib/pkg_resources.py -> build/bdist.macosx-10.6-universal/egg
    creating build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/__init__.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/archive_util.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/cli.exe -> build/bdist.macosx-10.6-universal/egg/setuptools
    creating build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/__init__.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/alias.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/bdist_egg.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/bdist_rpm.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/bdist_wininst.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/build_ext.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/build_py.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/develop.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/easy_install.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/egg_info.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/install.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/install_egg_info.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/install_lib.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/install_scripts.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/register.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/rotate.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/saveopts.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/sdist.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/setopt.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/test.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/upload.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/command/upload_docs.py -> build/bdist.macosx-10.6-universal/egg/setuptools/command
    copying build/lib/setuptools/depends.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/dist.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/extension.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/gui.exe -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/package_index.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    copying build/lib/setuptools/sandbox.py -> build/bdist.macosx-10.6-universal/egg/setuptools
    creating build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/__init__.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/doctest.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_build_ext.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_develop.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_easy_install.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_packageindex.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_resources.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_sandbox.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/setuptools/tests/test_upload_docs.py -> build/bdist.macosx-10.6-universal/egg/setuptools/tests
    copying build/lib/site.py -> build/bdist.macosx-10.6-universal/egg
    byte-compiling build/bdist.macosx-10.6-universal/egg/easy_install.py to easy_install.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/pkg_resources.py to pkg_resources.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/__init__.py to __init__.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/archive_util.py to archive_util.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/__init__.py to __init__.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/alias.py to alias.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/bdist_egg.py to bdist_egg.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/bdist_rpm.py to bdist_rpm.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/bdist_wininst.py to bdist_wininst.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/build_ext.py to build_ext.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/build_py.py to build_py.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/develop.py to develop.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/easy_install.py to easy_install.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/egg_info.py to egg_info.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/install.py to install.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/install_egg_info.py to install_egg_info.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/install_lib.py to install_lib.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/install_scripts.py to install_scripts.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/register.py to register.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/rotate.py to rotate.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/saveopts.py to saveopts.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/sdist.py to sdist.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/setopt.py to setopt.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/test.py to test.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/upload.py to upload.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/command/upload_docs.py to upload_docs.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/depends.py to depends.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/dist.py to dist.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/extension.py to extension.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/package_index.py to package_index.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/sandbox.py to sandbox.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/__init__.py to __init__.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/doctest.py to doctest.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_build_ext.py to test_build_ext.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_develop.py to test_develop.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_easy_install.py to test_easy_install.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_packageindex.py to test_packageindex.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_resources.py to test_resources.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_sandbox.py to test_sandbox.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/setuptools/tests/test_upload_docs.py to test_upload_docs.pyc
    byte-compiling build/bdist.macosx-10.6-universal/egg/site.py to site.pyc
    creating build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/PKG-INFO -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/entry_points.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/entry_points.txt.orig -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/top_level.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    copying distribute.egg-info/zip-safe -> build/bdist.macosx-10.6-universal/egg/EGG-INFO
    creating dist
    creating 'dist/distribute-0.6.10-py2.6.egg' and adding 'build/bdist.macosx-10.6-universal/egg' to it
    removing 'build/bdist.macosx-10.6-universal/egg' (and everything under it)
    Processing distribute-0.6.10-py2.6.egg
    removing '/Library/Python/2.6/site-packages/distribute-0.6.10-py2.6.egg' (and everything under it)
    creating /Library/Python/2.6/site-packages/distribute-0.6.10-py2.6.egg
    Extracting distribute-0.6.10-py2.6.egg to /Library/Python/2.6/site-packages
    Adding distribute 0.6.10 to easy-install.pth file
    Installing easy_install script to /usr/local/bin
    Installing easy_install-2.6 script to /usr/local/bin
    
    Installed /Library/Python/2.6/site-packages/distribute-0.6.10-py2.6.egg
    Processing dependencies for distribute==0.6.10
    Finished processing dependencies for distribute==0.6.10
    After install bootstrap.
    /Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg-info already exists
    dane:seven dane$ pip install nose
    Downloading/unpacking nose
      Running setup.py egg_info for package nose
        error: could not create 'pip-egg-info/nose.egg-info': Permission denied
        Complete output from command python setup.py egg_info:
        running egg_info
    
    creating pip-egg-info/nose.egg-info
    
    error: could not create 'pip-egg-info/nose.egg-info': Permission denied
    
    ----------------------------------------
    Command python setup.py egg_info failed with error code 1
    Storing complete log in ./pip-log.txt
    Traceback (most recent call last):
      File "/usr/local/bin/pip", line 5, in <module>
        pkg_resources.run_script('pip==0.6.1', 'pip')
      File "/Library/Python/2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 461, in run_script
        self.require(requires)[0].run_script(script_name, ns)
      File "/Library/Python/2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 1194, in run_script
        execfile(script_filename, namespace, namespace)
      File "/Library/Python/2.6/site-packages/pip-0.6.1-py2.6.egg/EGG-INFO/scripts/pip", line 3, in <module>
        pip.main()
      File "/Library/Python/2.6/site-packages/pip-0.6.1-py2.6.egg/pip.py", line 1305, in main
        return command.main(initial_args, args[1:], options)
      File "/Library/Python/2.6/site-packages/pip-0.6.1-py2.6.egg/pip.py", line 497, in main
        log_fp = open_logfile_append(log_fn)
      File "/Library/Python/2.6/site-packages/pip-0.6.1-py2.6.egg/pip.py", line 4525, in open_logfile_append
        log_fp = open(filename, 'a')
    IOError: [Errno 13] Permission denied: './pip-log.txt'
    dane:seven dane$ sudo pip install nose
    Downloading/unpacking nose
      Running setup.py egg_info for package nose
        no previously-included directories found matching 'doc/.build'
    Installing collected packages: nose
      Running setup.py install for nose
        no previously-included directories found matching 'doc/.build'
        Installing nosetests-2.6 script to /usr/local/bin
        Installing nosetests script to /usr/local/bin
    Successfully installed nose
    
    
  3. Anonymous

    You shouldn't have to execute distribute_setup.py as root. distribute_setup.py wants to remove the former setuptools and you cannot override this behavior. On most modern OS X systems, setuptools comes installed as root as part of the base install. distribute_setup.py should honor --prefix=..., etc. and resist tampering with the existing system.

    For users who do not have root access, they need to be able to do something like the following:

    % export PATH="${HOME}/bin:${PATH}"
    % PY_VERS="$(python -c 'import sys ; print "%d.%d" % sys.version_info[0:2]')"
    % export PYTHONPATH="${HOME}/lib/python${PY_VERS}/site-packages${PYTHONPATH:+:}${PYTHONPATH}"
    % curl -O http://python-distribute.org/distribute_setup.py \
        && python distribute_setup.py \
            --prefix="${HOME}" ...
    ...
    % # Alternatively...
    % curl -O http://python-distribute.org/distribute_setup.py \
        && python distribute_setup.py \
            --install-dir="${HOME}/lib/python${PY_VERS}/site-packages" \
            --script-dir="${HOME}/bin" ...
    ...
    

    These should result in the following:

    % ls ~/bin ~/lib/python${PY_VERS}/site-packages
    .../bin:
    easy_install
    easy_install-2.6
    
    .../lib/python2.6/site-packages:
    distribute-0.6.10-py2.6.egg
    easy-install.pth
    setuptools.pth
    

    Note: the above works with setuptools (even with an existing root-installed system installation).

  4. Anonymous
  5. Log in to comment