It’s a bit of a tangent, but I often wish that pip install
had a --local
switch akin to --user
that installed packages into __pypackages__
, say, in the local folder. This local installation would be lightweight and completely transparent, without explicit activation, and would work on top of venv, conda, etc. As such, it would be part of the import system in Python rather than any specific package manager.
In the spirit of this PEP, if global installation is impossible, e.g. because of EXTERNALLY-MANAGED
, then pip
could say: “You can install packages locally into the current folder using pip install --local
.” This would not elevate venv or any other tool above any others.
Ideally, the local install would keep a list of installed packages that can be committed, as well as the actual binaries separated by Python ABI, so that you can just reinstall the local packages with some command should you switch machines or Python version.