-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-venvRelated to the venv moduleRelated to the venv moduletype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
When a user runs:
python -m venv myenvand the directory already contains a virtual environment, Python silently performs no action. This behavior can be confusing, as the user receives no indication that the command had no effect.
I propose that venv should display a simple warning when it detects an existing virtual environment so the user knows the operation didn’t make any changes.
Example of the suggested output:
$ python -m venv myenv
Existing virtual environment found at 'myenv'.
No changes were made.
Use '--clear' to recreate this environment.This provides clarity while keeping behavior backward-compatible. Users who want to recreate the environment can explicitly use --clear.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
dolfinus
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-venvRelated to the venv moduleRelated to the venv moduletype-featureA feature request or enhancementA feature request or enhancement