PEP 704 - Require virtual environments by default for package installers

That is a good question. I think the PEP should state something about that explicitly but how I interpreted it (although it did not state it) was that if a tool for example has a Python setup they want to install into they would set the VIRTUALENV environment variable.

So for example our Agent at Datadog distributes a Python installation that most of the Agent Integrations use. Starting with Python 3.13 we would modify our installation command (which just uses pip currently but that’s irrelevant) to set that environment variable first thing.