Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
Feature or enhancement
Proposal:
Currently, the mechanism behind virtual environments is implemented in thesite module. This means that disabling thesite initialization (passing-S) disables virtual environments.
I would like to move the virtual environment detection fromsite to the interpreter initialization (getpath), which would essentially consist of settingsys.prefix tosys.exec_prefix to the virtual environment prefix ingetpath.
The motivation is the same asGH-126793, the same UX example applies. Runningpython -S -m ensurepip inside a virtual environment would install to the system, instead of the virtual environment.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response