Issue #150 resolved

easy_install uses ~/.local even in a --no-site-packages virtualenv

Sridhar Ratnakumar
created an issue

(pip doesn't do this)

{{{ sridharr@whymac:~/tmp/traits > virtualenv --no-site-packages traitsenv New python executable in traitsenv/bin/python Installing distribute.................................................................................................................................................................................done. sridharr@whymac:~/tmp/traits > traitsenv/bin/easy_install traits Searching for traits Best match: Traits 3.2.0 Adding Traits 3.2.0 to easy-install.pth file

Using /Users/sridharr/.local/lib/python2.6/site-packages Processing dependencies for traits Finished processing dependencies for traits }}}

Comments (10)

  1. Sridhar Ratnakumar reporter

    To fully reproduce it, first install Traits itself to /.local using the `--user` option to setup.py. Then use "virtualenv --no-site-packages --distribute traitsenv" (BTW, in ActivePython we patched virtualenv to use distribute by default) and try to use its easy_install.

  2. Sridhar Ratnakumar reporter
    traitsenv/bin/python -c "import site; print site.USER_SITE; print site.USER_BASE"
    /Users/sridharr/.local/lib/python2.6/site-packages
    /Users/sridharr/.local
    

    The `virtualenv` I used is itself from /.local:

    sridharr@whymac:~/tmp/traits > which virtualenv
    /Users/sridharr/.local/bin/virtualenv
    
  3. Sridhar Ratnakumar reporter

    No .local here:

    sridharr@whymac:~/tmp/traits > traitsenv/bin/python -c "import sys; print sys.path"
    ['', '/Users/sridharr/tmp/traits/traitsenv/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg', '/Users/sridharr/tmp/traits/traitsenv/lib/python2.6/site-packages/pip-0.7.1-py2.6.egg', '/Users/sridharr/tmp/traits/traitsenv/lib/python26.zip', '/Users/sridharr/tmp/traits/traitsenv/lib/python2.6', '/Users/sridharr/tmp/traits/traitsenv/lib/python2.6/plat-darwin', '/Users/sridharr/tmp/traits/traitsenv/lib/python2.6/plat-mac', '/Users/sridharr/tmp/traits/traitsenv/lib/python2.6/plat-mac/lib-scriptpackages', '/Users/sridharr/tmp/traits/traitsenv/lib/python2.6/lib-tk', '/Users/sridharr/tmp/traits/traitsenv/lib/python2.6/lib-old', '/Users/sridharr/tmp/traits/traitsenv/lib/python2.6/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6', '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages', '/Users/sridharr/tmp/traits/traitsenv/lib/python2.6/site-packages']
    

    Also user site is disabled:

    sridharr@whymac:~/tmp/traits > traitsenv/bin/python -c "import site; print site.ENABLE_USER_SITE"
    False
    

    So this seems to be an easy_install bug which is not respecting ENABLE_USER_SITE.

  4. Log in to comment