easy_install installed in the user dir tries to install stuff in the global python when --user is not used

Issue #95 resolved
Jason Baker
created an issue

If I do the following command to install to my global site-packages directory:

easy_install -U distribute

I get an error saying that I don't have permission to install (as I forgot the sudo command). However, after that point in time, easy_install doesn't seem to work. If I run it, I get this traceback:

Traceback (most recent call last): File "/Users/jason/.local/bin/easy_install", line 8, in <module> load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')() File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 271, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 2173, in load_entry_point raise ImportError("Entry point %r not found" % ((group,name),)) ImportError: Entry point ('console_scripts', 'easy_install') not found

The only way I've been able to resolve this issue is to download the source distribution and do a sudo python setup.py install.

Comments (7)

  1. Tarek Ziadé repo owner

    Something looks wrong (and is probaly why it broke):

    It looks like you've installed easy_install in your user dir (/Users/jason/.local/) and in the meantime calling the global installation

  2. Sridhar Ratnakumar

    I get this error too (with Distribute also installed in /.local -- which is natural when using ActivePython/PyPM). Full traceback:

    $ easy_install -U distribute==dev
    Searching for distribute==dev
    Reading http://pypi.python.org/simple/distribute/
    Reading http://packages.python.org/distribute
    Best match: distribute dev
    Downloading http://bitbucket.org/tarek/distribute/get/0.6-maintenance.zip#egg=distribute-dev
    Processing 0.6-maintenance.zip
    Running distribute/setup.py -q bdist_egg --dist-dir /var/folders/Oq/OqXMUNQQE8iwWVizww3LJ++++TM/-Tmp-/easy_install-VtTCyG/distribute/egg-dist-tmp-eK92nc
    Before install bootstrap.
    Scanning installed packages
    Setuptools installation detected at /Users/sridharr/.local/lib/python2.6/site-packages
    Non-egg installation
    Removing elements out of the way...
    Already patched.
    /Users/sridharr/.local/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info already patched.
    After install bootstrap.
    /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info already exists
    Adding distribute 0.6.11dev to easy-install.pth file
    error: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools.pth: Permission denied

    Simplest repro step:

    1. Install ActivePython 2.6
    2. Type "pypm install zope.interface" .. to install zope.interface and its dependencies (which includes Distribute) into /.local
    3. Type /.local/bin/easy_install -U distribute==dev
  3. Tarek Ziadé repo owner

    It will work if you do:

    ~/.local/bin/easy_install --user -U distribute==dev

    IOW, easy_install needs to detect it is running locally, even if the --user option is not provided

  4. Log in to comment