[Python-modules-team] Bug#895232: Please do not force --ignore-installed behaviour for non-root users

Antoine Musso amusso at free.fr
Thu Apr 26 14:40:35 BST 2018


I encountered the issue today and I believe ignore installed should not
be enforced. If the system already has a package that match a condition,
it should be used instead of installing a new one from pypi.  I think
that is the behavior that most would expect.

If there is a version requirement that is not matched by the system
package, it will end up being installed in the user directory.


A way to cancel the patch is to configure pip via an environment
variable: PIP_IGNORE_INSTALLED=false

An example is GitPython. The available version as of this writing:

Stretch: 2.1.1
testing: 2.1.8
Pypi: 2.1.9

Given python3-git is installed and running pip3 install GitPython, the
version 2.1.9 from pypi is installed.
As a root user, it find the existing system installation.


At a minimum README.Debian could better highlight that behavior and the
pip install helps could add more details to --ignore-installed:

   -I, --ignore-installed
   Ignore the installed packages (reinstalling instead).
   On Debian: always set for non root users (system packages are
ignored). Set PIP_IGNORE_INSTALLED=false to override.


But probably it would be nicer to no more hardcode --ignore-installed
and let the user pick the best decision.

-- 
Antoine Musso



More information about the Python-modules-team mailing list