ubuntu-20.04 pip3 ignores /etc/pip.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pip |
Fix Released
|
Unknown
|
|||
python-pip (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Stefano Rivera |
Bug Description
[Impact]
* Ubuntu's pip doesn't read /etc/pip.conf, the upstream documented
configuration file location, instead it reads the alternate path:
/etc/
* While the alternate path is documented, too, this will probably confuse
users.
[Test Plan]
# apt install python3-pip
# python3 -c "from pip._internal.
False = bug
True = expected behaviour
[Where problems could occur]
* It's possible that somebody is relying on this behaviour to target one
config file at Ubuntu's pip and another at upstream pip, but that does
seem far-fetched.
* The patch is from upstream, so we're not stepping into uncharted
territory.
[Other Info]
* Upstream PR: https:/
[Original Bug Report]
The pip3-20.0.2 from python3-pip package, and also installed with "python3 -m venv" (ensurepip module), ignores /etc/pip.conf.
Based on https:/
Steps to reproduce:
1. Add special package index URL to /etc/pip.conf, for example
[global]
index-url = https:/
2. Try to install a package from your special index
Expected result:
* Packages from your index are available.
Current result:
* Only PyPI packaged are available.
----
We are trying to use this functionality to provide a local cache of PyPI using Artifactory - to speed-up creating virtual environments inside short-lived Docker and lessen PyPI bandwidth.
We are working around this by copying the file to ~/.config/
----
vagrant@
Description: Ubuntu 20.04.2 LTS
Release: 20.04
vagrant@
python3-pip:
Installed: 20.0.2-5ubuntu1.1
Candidate: 20.0.2-5ubuntu1.1
Version table:
*** 20.0.2-5ubuntu1.1 500
500 http://
500 http://
100 /var/lib/
20.
500 http://
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: python3-pip 20.0.2-5ubuntu1.1
ProcVersionSign
Uname: Linux 5.4.0-65-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Tue Feb 2 12:32:07 2021
PackageArchitec
SourcePackage: python-pip
UpgradeStatus: No upgrade log present (probably fresh install)
description: | updated |
Changed in pip: | |
status: | Unknown → New |
Changed in python-pip (Ubuntu Focal): | |
status: | New → In Progress |
assignee: | nobody → Stefano Rivera (stefanor) |
Changed in pip: | |
status: | New → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.