Pip Installs Packages Into Global Enviroment While VirtualEnv is Activated
See original GitHub issue- Pip version: 8.1.1
- Python version: 3.5
- Operating system: Ubuntu 16.04
Description:
I am trying to create a virtualenv and install packages from requirements.txt that I have with the project.
When I create the environment, I check that the python and pip indeed come from that enviroment. Namely, when I run:
source ./virtualenv/bin/activate
which pip
which python
I get results that point to the binaries located inside the virtualenv directory
What I’ve run:
I then proceed to install the packages:
pip install -r requirements.txt
For awhile, it was giving me trouble about the pkg-resources=0.0.0
line within the requirements.txt. As it turned, that line is input into this file because of a bug in Ubuntu. As you can probably surmise, I had created this file on an Ubuntu machine.
Once I strike the line out, the installation proceeds.
However, when I run pip list
after the installation, the list contains only
pip (8.1.1) pkg-resources (0.0.0) setuptools (20.7.0)
What is more, if I deactivate the virtualenv and run pip list
globally, I see that all of the dependencies were installed globally.
There are two questions here. One - that is most obious - why does it happen? The second one is how could I clean up my global packages and uninstall the pollutants which now reside there?
Here is the requirements.txt file
aldryn-apphooks-config==0.3.3
aldryn-background-image==0.1.1
aldryn-boilerplates==0.7.5
aldryn-bootstrap3==1.2.2
aldryn-categories==1.0.4
aldryn-common==1.0.4
aldryn-events==1.1.7
aldryn-forms==2.2.2
aldryn-newsblog==1.3.3
aldryn-people==1.2.2
aldryn-reversion==1.0.9
aldryn-translation-tools==0.2.1
Babel==2.4.0
backport-collections==0.1
cssselect==1.0.1
cssutils==1.0.2
dj-database-url==0.4.2
Django==1.9.13
django-absolute==0.3
django-appconf==1.0.2
django-appdata==0.1.6
django-bootstrap3==8.2.3
django-classy-tags==0.8.0
django-cms==3.4.3
django-emailit==0.2.2
django-extended-choices==1.1.1
django-filer==1.2.7
django-formtools==2.0
django-mptt==0.8.7
django-parler==1.7
django-phonenumber-field==1.3.0
django-polymorphic==1.0.2
django-reversion==1.10.2
django-sekizai==0.10.0
django-simple-captcha==0.5.5
django-sizefield==0.9.1
django-sortedm2m==1.3.3
django-standard-form==1.1.1
django-tablib==3.2
django-taggit==0.22.1
django-treebeard==4.1.0
djangocms-admin-style==1.2.7
djangocms-attributes-field==0.2.0
djangocms-column==1.7.0
djangocms-file==2.0.2
djangocms-googlemap==1.1.0
djangocms-installer==0.9.6
djangocms-link==2.1.2
djangocms-picture==2.0.5
djangocms-snippet==1.9.2
djangocms-style==2.0.2
djangocms-text-ckeditor==3.5.0
djangocms-video==2.0.3
easy-thumbnails==2.3
future==0.16.0
html5lib==0.9999999
lxml==3.7.3
olefile==0.44
phonenumbers==8.4.3
phonenumberslite==8.4.3
Pillow==4.1.1
premailer==3.0.1
python-dateutil==2.6.0
python-slugify==1.2.0
pytz==2017.2
requests==2.14.2
six==1.10.0
tablib==0.11.4
tzlocal==1.4
Unidecode==0.4.20
YURL==0.13
Issue Analytics
- State:
- Created 6 years ago
- Comments:22 (11 by maintainers)
I had a similar issue. Following command worked for me-
<path-to-your-env>/bin/pip3 install -r requirements.txt
@RonnyPfannschmidt you are not being constructive. Show how to DO IT instead of tellling me how NOT TO DO IT.