Pip/conda compatibility

For Conda much more than just arguably unnecessary or at worst a mere minor annoyance for some use cases, like venvs in container images, but rather actively harmful and would indeed cause a lot of eventual breakage—the aforementioned PEP 704 discussion goes soemwhat into that. Having a venv on top of a Conda envs means:

  • Users will always need to remember to activate both layers of environment isolation instead of one (and possibly even in the correct order), and if they don’t they’ll get unexpected, broken and likely confusing results (unlike with Docker, where once their image is spun up there’s only one layer, venv, and there is no way to activate the latter without the former). Given a large proportion of Conda users are non-programmers—scientists, engineers, data analysts, students, etc.—for which it is already hard enough to teach them to create, activate and use a conda environment (which is a single, simple cross-platform command), its much more difficult to ensure they remember to not only do conda activate env-name, but then also always remember the much more unfriendly and platform-specific method of activating a venv, this introduces an order of magnitude more complexity and failure modes.
  • The existing Conda-pip interoperability mechanisms won’t function, since the Conda env has no real way of determining whether some arbitrary venv may or may not be activated on top of it
  • Duplicate or conflicting packages can much more easily be installed on the Conda side
  • Conda cannot detect much less offer to fix any incompatibility, missing dep, conflict or other problem that might arise (as it can now)
  • If the Conda env is removed, renamed, recreated, the Python version upgraded/downgraded, etc. (all a fairly routine and recommended occurrence with Conda) all associated venvs will silently and perhaps irreversibly break
  • The current situation is AFAIK better than it used to be to the point where at least basic venv/virtualenv is usable for at least simple cases (it apparently took a bunch of work by the Conda folks to even get that working), but there’s historically been lots of bugs reported against it and I have no idea how stable it is in the many edge/corner cases.