Skip to content
Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

🛠️Appendix E

virtualenvwrapper Cheatsheet


1. Installation

For Apple macOS, the installation is executed via this command:

pip install virtualenvwrapper

Then, open the zshrc via Terminal and insert the following configuration at the bottom:

# Virtualenvwrapper configuration
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Development   # Optional: default directory for projects
export VIRTUALENVWRAPPER_PYTHON=$(which python3)
source $(which virtualenvwrapper.sh)

For Microsoft Windows, you can use the virtualenvwrapper-win which can be run under Microsoft Windows Command Prompt. The installation is also executed via pip command as follows:

pip install virtualenvwrapper-win

You can read more information of the virtualenvwrapper-win at https://pypi.org/project/virtualenvwrapper-win/


2. Basic commands

Action
Apple macOS
Microsoft Windows

Create an environment

mkvirtualenv <name>

mkvirtualenv <name>

Activate / Switch environment

workon <name>

workon <name>

List all environments

workon or lsvirtualenv

workon or lsvirtualenv

Deactivate active environment

deactivate

deactivate

Delete an environment

rmvirtualenv <name>

rmvirtualenv <name>

Create project folder + env together

mkproject <name>

mkproject <name>

Install single packages

pip install <package>

pip install <package>


3. Example flow of commands


4. Reference

Last updated