Skip to content

pyenv virtualenv-reset - Reset a virtual environment to an initial state #510

Open
@erezh16

Description

@erezh16

This is an enhancement proposal that I would find quite useful.

I use pyenv with virtual envs all the time. Quite convenient to set both the Python version, tooling and packages in one place.
One common issue I have it that I would like to use the same virtual env several times, starting from scratch, e.g., when testing installation configurations.

I propose to add a new command, pyenv virtualenv-reset [<venv>] that would do the following:

  1. Delete the venv (deactivate it first if active)
  2. Re-create the venv with the same Python version that it had before
  3. If venv was initially active, activate it again automatically

If venv is not provided, the currently-active venv is selected for reset

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions