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.
pip install virtualenvwrapperNo compatibility data collected yet for this library.
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.
Ensure you are using Python 3.8+ and that VIRTUALENVWRAPPER_PYTHON points to a Python 3 interpreter.
This feature is no longer supported. Manage site-packages inclusion when creating the virtual environment using virtualenv's options directly.
Use a supported shell like `bash` or `zsh`.
Consider installing virtualenvwrapper within its own dedicated virtual environment using `python3 -m venv` and then configuring your shell to source `virtualenvwrapper.sh` from *that* venv's `bin` directory.
Use `pip install virtualenvwrapper-win` and follow its specific setup instructions for Windows Command Prompt.
Ensure `virtualenvwrapper` is installed for the Python version pointed to by `VIRTUALENVWRAPPER_PYTHON`. Update your shell startup file to set `VIRTUALENVWRAPPER_PYTHON` to the *exact* path of the Python interpreter where `virtualenvwrapper` is installed (e.g., `export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3`). Ensure this `export` line comes *before* the `source virtualenvwrapper.sh` line.
First, locate the actual `virtualenvwrapper.sh` script (e.g., using `find / -name virtualenvwrapper.sh 2>/dev/null` or `which virtualenvwrapper.sh` after install). Then, update the `source` command in your shell startup file to reflect the correct path (e.g., `source $(python3 -m site --user-base)/bin/virtualenvwrapper.sh` or `source ~/.local/bin/virtualenvwrapper.sh`).
Ensure `virtualenvwrapper.sh` is sourced in your shell startup file (`~/.bashrc`, `~/.zshrc`, etc.) and that you have reloaded your shell (either by `source ~/.bashrc` or opening a new terminal window).
Before running `mkproject`, ensure the directory specified by your `PROJECT_HOME` environment variable exists, or create the target project directory manually. For example: `mkdir -p $HOME/Projects` then `export PROJECT_HOME=$HOME/Projects`.