PEP 704 - Require virtual environments by default for package installers

I’ve never once used a virtual environment in a docker build, even with complex multistage builds, so they’re not hardly required.

It is true that python:3.13 can activate a virtual environment, but that doesn’t solve the larger problem that this PEP assumes that the only isolation mechanism worth caring about is virtualenv / venv, it just means that in one particular case there is a work around (which is effectively “use venv”).

As an additional note, I’d note that unless great care is taken (or changes are made to venv/virtualenv), this also suffers from the “implicitly re-using environments across computers” problem that I mentioned in the PEP 582 thread.

7 Likes