virtualenvwrapper
Convenience wrappers for virtualenv
TLDR
SYNOPSIS
mkvirtualenv envnameworkon [envname]rmvirtualenv envname
DESCRIPTION
virtualenvwrapper is a set of shell extensions that enhance the standard virtualenv tool for managing Python virtual environments. It provides convenient wrapper commands for creating, activating, switching between, and deleting environments, all from a centralized location rather than scattered across project directories.The core workflow revolves around the `workon` command for listing and switching environments, `mkvirtualenv` for creation, and `rmvirtualenv` for deletion. All environments are stored in a single configurable directory (typically `~/.virtualenvs`), making them easy to find and manage regardless of where project code resides.The tool also supports project directory association, allowing automatic directory changes when activating an environment, and provides hook scripts that run at key lifecycle events such as environment creation, activation, and deactivation for custom automation.
COMMANDS
mkvirtualenv [-a projectpath] [-i package] [-r requirementsfile] envname
Create environment. Options -a, -i, -r are handled by virtualenvwrapper; all other options are passed to virtualenv.workon [envname]
Activate environment, or list all if no name given.deactivate
Exit current environment.rmvirtualenv envname
Delete environment.cpvirtualenv source dest
Duplicate an existing environment.cdproject
Change to associated project directory.setvirtualenvproject [virtualenvpath projectpath]
Associate project directory with environment.allvirtualenv command
Run a command across all environments.lsvirtualenv [-b] [-l]
List all environments (-b brief, -l long).
CAVEATS
Requires shell configuration: source the virtualenvwrapper.sh script in your shell profile. All environments are stored in a single directory (default: ~/.virtualenvs), configured by the WORKON_HOME environment variable.
HISTORY
virtualenvwrapper was created by Doug Hellmann to make managing Python virtual environments easier.
SEE ALSO
virtualenv(1), venv(1), pip(1)
