Registry / devops / virtualenvwrapper

virtualenvwrapper

JSON →
library6.1.1pypypiunverified

virtualenvwrapper is a set of extensions for Ian Bicking's virtualenv tool, designed to simplify the management of Python virtual environments. It organizes all environments in one place, provides wrappers for creating, copying, and deleting environments, and enables quick switching between them with tab completion. The current version is 6.1.1, and it is actively maintained with a focus on modern Python versions.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

This quickstart guides you through installing virtualenvwrapper, configuring your shell, creating your first virtual environment, installing a package, and switching between environments. It's crucial to correctly source the virtualenvwrapper.sh script in your shell's startup file.

# 1. Install virtualenvwrapper (if not already done) pip install virtualenvwrapper # 2. Add configuration to your shell startup file (e.g., ~/.bashrc or ~/.zshrc) # Replace '/usr/bin/python3' with the path to your desired Python 3 interpreter if different. # Replace 'virtualenvwrapper.sh' path if it's not found in default user-base bin. # Example for .bashrc or .zshrc: # export WORKON_HOME=$HOME/.virtualenvs # mkdir -p $WORKON_HOME # export VIRTUALENVWRAPPER_PYTHON=$(which python3) # source $(python3 -m site --user-base)/bin/virtualenvwrapper.sh # 3. Reload your shell configuration (or open a new terminal) source ~/.bashrc # or source ~/.zshrc # 4. Create a new virtual environment mkvirtualenv myproject_env # 5. Verify the active environment workon # 6. Install packages in the active environment pip install requests # 7. Deactivate the environment deactivate # 8. Switch to another environment (or reactivate) workon myproject_env
virtualenvwrapper --version
Debug
Known footguns
breakingPython 2 support was formally dropped in virtualenvwrapper 6.x. Attempts to use it with Python 2 will fail or lead to unexpected behavior.
breakingThe `toggleglobalsitepackages` command was removed in virtualenvwrapper 6.x because the underlying capability was removed from virtualenv itself.
breakingSupport for `ksh` shell was dropped in virtualenvwrapper 6.x.
gotchaFor Python 3.12+, global pip installs are discouraged due to stricter rules to prevent system package conflicts. Installing virtualenvwrapper globally with `pip install virtualenvwrapper` might not make it accessible to your shell or lead to `ModuleNotFoundError` for `virtualenvwrapper.hook_loader`.
gotchaWindows users should install `virtualenvwrapper-win` instead of `virtualenvwrapper`. The core `virtualenvwrapper` is a set of shell scripts designed for Unix-like environments (Linux/macOS).
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
8 hits · last 30 days
ahrefsbot
4
gptbot
3
script
1
Resources