Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtualenv sensitive to unnormalized python paths #165

Closed
ianb opened this issue Aug 17, 2011 · 4 comments
Closed

virtualenv sensitive to unnormalized python paths #165

ianb opened this issue Aug 17, 2011 · 4 comments

Comments

@ianb
Copy link

ianb commented Aug 17, 2011

If you install a package globally with easy_install, then create a virtualenv, sys.path will be sensitive to how you invoke the virtualenv Python interpreter.

A rough way to reproduce:

$ /usr/bin/easy_install SomePackage
$ virtualenv test-env
$ ./test-env/bin/python -c 'import sys, pprint; pprint.pprint(sys.path)' > normal-path.txt
$ ./test-env/../test-env/bin/python -c 'import sys, pprint; pprint.pprint(sys.path)' > unnormal-path.txt
$ diff -u normal-path.txt unnormal-path.txt

You should see that /usr/lib/pythonX.Y/site-packages/SomePackage-X.Y.egg appears in different locations on sys.path depending on how the Python interpreter is invoked. In practice this can mean the global egg does or does not override the local egg depending on the invocation.

Note: this has only been reproduced on two different Ubuntu systems, I'm not sure about other platforms.

@sunshowers
Copy link

If anybody else hits this issue, one workaround (if you don't care about any site packages) is to use --no-site-packages to set up the virtualenv.

@stale
Copy link

stale bot commented Jan 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions.

1 similar comment
@stale
Copy link

stale bot commented Apr 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 15, 2019
@gaborbernat
Copy link
Contributor

This is becoming obsolete with #1366 now in full swing.

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants