virtual env wind code example

Example 1: how to activate a venv in windows

\env\Scripts\activate.bat

Example 2: virtualenvwrapper-win

# For linux
sudo pip install virtualenvwrapper

# For windows
pip install virtualenvwrapper
pip install --user virtualenvwrapper

# Create virtual environment
virtualenvwrapper 
workon env

Run: workon
A list of environments, empty, is printed.

Run: mkvirtualenv temp
A new environment, temp is created and activated.

Run: workon
This time, the temp environment is included.

Run: workon temp
To activate temp env

Tags:

Misc Example