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 looks at system site packages (Ubuntu 16.04) #995

Closed
kunaltyagi opened this issue Dec 10, 2016 · 4 comments
Closed

Virtualenv looks at system site packages (Ubuntu 16.04) #995

kunaltyagi opened this issue Dec 10, 2016 · 4 comments

Comments

@kunaltyagi
Copy link

I'm not sure if it is an issue with pip or virtualenv, I've noticed it with pip only. Managed to reproduce it everytime by $ sudo apt install python-pip. Shouldn't local packages be given more priority?

(py2)$ which pip
/home/kunal/py2/bin/pip
(py2)$ pip --version
pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)
(py2)$ sudo apt remove python-pip
(py2)$ which pip
/home/kunal/py2/bin/pip
(py2)$ pip --version
pip 9.0.1 from /home/kunal/py2/local/lib/python2.7/site-packages (python 2.7)
(py2)$ virtualenv --version
15.0.1
$ uname -a
Linux alien 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

PS: Ignore the time (it's a dual boot fresh install system)

@yan12125
Copy link

Could you remove this line from virtualenv.py:

fix_local_scheme(home_dir, symlink)

And try again? (create a new virtual env, pip ...)

Ref: #118

@kunaltyagi
Copy link
Author

Thanks. This solves the issue.

Is this the official fix? When is this coming as a part of ubuntu package?

@yan12125
Copy link

Is this the official fix?

Nope. That's just my guess. I don't know the actual cause, either.

@stale
Copy link

stale bot commented Jan 14, 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 Jan 14, 2019
@stale stale bot closed this as completed Jan 21, 2019
@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

2 participants