Skip to content

Warn when running in a virtual environment that was created for a different minor Python version #127727

@FFY00

Description

@FFY00

Feature or enhancement

Proposal:

Environment paths change between minor Python version. When a virtual environment's base Python installation gets updated, the site-packages directories, for eg, will be different, meaning Python won't be able to access any previously installed packages (nor would we want to, as they may be incompatible).

On these situations, we could issue a warning suggesting the user to run python -m venv --upgrade.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-venvRelated to the venv moduletype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions