(Note for board admins: it may make sense to split this out to a new thread, since it’s less about “a one-size-fits-all tool might be nice to have” and more “there are still some genuinely rough edges in conda/pip interopability that we might be able to do something about without having to tackle the Gordian knot that is detailed platform dependency declarations”)
@pf_moore @rgommers @pzwang @jezdez @encukou @hroncok The various references in this thread to the mechanisms that Linux distros use to communicate preferences to pip
and other Python installers prompted me to go find a good link to explain what those are to readers that aren’t already familiar with them. I couldn’t find one, which seems like it should be a fixable problem:
- Installation database spec does not make it clear how to protect a package from uninstallation · Issue #1211 · pypa/packaging.python.org · GitHub
- PEP 668 (EXTERNALLY-MANAGED file) is missing from specifications page · Issue #1212 · pypa/packaging.python.org · GitHub
Both of those are relevant to the conda
/pip
interoperability question:
- if
conda
is currently providing.dist-info/RECORD
files for the Python packages it installs, then dropping or renaming them would be one way to getpip
and other tools to always leave conda-installed packages alone (however, I don’t know enough about conda’s mechanics to know if that might cause other issues, in which case the “split installation & import path” approach might be preferable) -
conda
environments may want to implement a Linux-distro style split between the install location used for curated distribution packages and the install location used by Python-specific tooling (this means Python-specific tooling will at worst shadow the conda provided packages, and potentially not even that if the conda managed directories are given precedence over the Python-only ones) - at a specification level, it’s worth considering whether the
EXTERNALLY-MANAGED
spec should be enhanced to allow runtime providers to select a “no native package installation” middle ground between “allow any packages (default)” and “disallow all packages (EXTERNALLY-MANAGED exists)”