pip installs to /usr/lib/python-x.y/site-packages if PYTHONUSERBASE is set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-pip (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
If the environment variables PYTHONUSERBASE is set, regardless of what it's set to, pip3 will install packages to /usr/lib/
Big-Kahuna:~ jginsberg$ docker run -it --rm=true ubuntu:xenial bash
root@5fd4377b59
(... snip ...)
root@5fd4377b59
Collecting django
Downloading Django-
100% |######
Collecting pytz (from django)
Downloading pytz-2017.
100% |######
Installing collected packages: pytz, django
Successfully installed django-1.11.1 pytz-2017.2
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@5fd4377b59
./usr/local/
./usr/local/
./usr/local/
root@5fd4377b59
Big-Kahuna:~ jginsberg$ docker run -it --rm=true ubuntu:xenial bash
root@446d9529fb
root@446d9529fb
(... snip ...)
root@446d9529fb
Collecting Django
Downloading Django-
100% |######
Collecting pytz (from Django)
Downloading pytz-2017.
100% |######
Installing collected packages: pytz, Django
Successfully installed Django pytz
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@446d9529fb
./usr/lib/
./usr/lib/
./usr/lib/
root@446d9529fb
Based on this comment: https:/ /bugs.launchpad .net/ubuntu/ +source/ python- pip/+bug/ 1308714/ comments/ 8 this seems related to #1308714.