All the tools currently exist (though some of them still require patching Python itself until Allow Python distributors to add custom site install schemes · Issue #88142 · python/cpython · GitHub is solved) for someone who is distributing Python to select one of the following behaviors:
- Allow pip to freely manage Python packages, including uninstalling packages that some other system has installed.
- This requires doing nothing special, it’s the default you get from Python.
- Allow pip and another package manager to safely [1] cooperate on managing a Python install such that they each install into their own directories, and do not trample over each other.
- This requires the custom site install scheme thing from above, which Debian , Fedora, etc carry patches to implement it until Python itself provides functionality for it.
- Disallow pip (by default) from touching their installation, marking it as something that pip shouldn’t be operating on unless you really know what you’re doing.
In the above, (2) and (3) can be combined so that pip won’t touch their Python by default, but if they do it anyways, it will be done in a safe way.
For Debian, Fedora, etc they should implement (2) and (3), Conda should probably only implement (2).
-
Safely at the file system level, of course if you’re installing packages you may break Python applications by installing versions of a dependency they don’t expect. ↩︎