Skip to content

pip freeze --local with --system-site-packages #139

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

Closed
impguard opened this issue Jan 7, 2016 · 6 comments
Closed

pip freeze --local with --system-site-packages #139

impguard opened this issue Jan 7, 2016 · 6 comments

Comments

@impguard
Copy link

impguard commented Jan 7, 2016

Hey, the changes in #32 seemed to fix --system-site-packages with binaries, but after installing the latest version (20151229), pip freeze --local shows all the packages globally.

> pyenv version
3.5.0 (set by /Users/kwu/.pyenv/version)

> pip freeze
appnope==0.1.0
decorator==4.0.6
dnspython3==1.12.0
engineering-insights-models==2.17.0
gnureadline==6.3.3
insights-template==0.0.12
ipython==4.0.1
ipython-genutils==0.1.0
numpy==1.10.2
path.py==8.1.2
pexpect==4.0.1
pickleshare==0.5
ptyprocess==0.5
py==1.4.31
pycrypto==2.6.1
pyfigurous==0.0.11
PyMySQL==0.6.7
pytest==2.8.5
python-dateutil==2.4.2
pytz==2015.7
requests==2.9.1
simple-crypt==4.1.7
simplegeneric==0.8.1
six==1.10.0
SQLAlchemy==1.0.11
traitlets==4.0.0
wheel==0.24.0
xlrd==0.9.4

> pyenv virtualenv --system-site-packages 3.5.0 tmp
Ignoring indexes: https://pypi.python.org/simple
Requirement already satisfied (use --upgrade to upgrade): setuptools in /Users/kwu/.pyenv/versions/3.5.0/lib/python3.5/site-packages
Requirement already satisfied (use --upgrade to upgrade): pip in /Users/kwu/.pyenv/versions/3.5.0/lib/python3.5/site-packages

> cd tmp

> pip freeze --local
appnope==0.1.0
decorator==4.0.6
dnspython3==1.12.0
engineering-insights-models==2.17.0
gnureadline==6.3.3
insights-template==0.0.12
ipython==4.0.1
ipython-genutils==0.1.0
numpy==1.10.2
path.py==8.1.2
pexpect==4.0.1
pickleshare==0.5
ptyprocess==0.5
py==1.4.31
pycrypto==2.6.1
pyfigurous==0.0.11
PyMySQL==0.6.7
pytest==2.8.5
python-dateutil==2.4.2
pytz==2015.7
requests==2.9.1
simple-crypt==4.1.7
simplegeneric==0.8.1
six==1.10.0
SQLAlchemy==1.0.11
traitlets==4.0.0
wheel==0.24.0
xlrd==0.9.4
@yyuu
Copy link
Collaborator

yyuu commented Jan 8, 2016

Isn't it a problem of pip with virtual environment created by venv (pyvenv) with --system-site-packages? Did you confirm that if it works fine without pyenv / pyenv-virtualenv?

@yyuu
Copy link
Collaborator

yyuu commented Jan 8, 2016

I confirmed that this reproduces without using pyenv / pyenv-virtualenv. This could be a bug of pip. Please find an issue from https://github.com/pypa/pip and file a new one if there isn't existing issue.

@yyuu yyuu closed this as completed Jan 8, 2016
@impguard
Copy link
Author

impguard commented Jan 8, 2016

This does not seem to be the case. I've run on a fresh system with python 3.5.0 installed, and plain virtualenv seems to be working fine.

root@75f957ae5f6a:/# mkdir temp

root@75f957ae5f6a:/# cd temp

root@75f957ae5f6a:/temp# pip freeze

root@75f957ae5f6a:/temp# pip install virtualenv
Collecting virtualenv
Downloading virtualenv-13.1.2-py2.py3-none-any.whl (1.7MB)
    100% |████████████████████████████████| 1.7MB 485kB/s
Installing collected packages: virtualenv
Successfully installed virtualenv-13.1.2

root@75f957ae5f6a:/temp# pip freeze
virtualenv==13.1.2

root@75f957ae5f6a:/temp# virtualenv --system-site-packages venv
Using base prefix '/usr/local'
New python executable in venv/bin/python3.5
Also creating executable in venv/bin/python
Installing setuptools, pip, wheel...done.

root@75f957ae5f6a:/temp# source venv/bin/activate

(venv)root@75f957ae5f6a:/temp# pip freeze
virtualenv==13.1.2
wheel==0.24.0

(venv)root@75f957ae5f6a:/temp# pip freeze -l
wheel==0.24.0

@impguard
Copy link
Author

impguard commented Jan 8, 2016

Ah, nevermind, it seems like virtualenv works appropriately, but not the venv module provided in python versions 3.3 and higher.

@yyuu
Copy link
Collaborator

yyuu commented Jan 8, 2016

Right. If you'd like to use virtualenv instead of venv from pyenv-virtualenv, please just try installing it to 3.5.0 via pip install virtualenv. pyenv-virtualenv prefers virtualenv over pyvenv if it is available.

@impguard
Copy link
Author

impguard commented Jan 8, 2016

Great, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants