how to create virtual environment in python in windows code example

Example 1: create venv in windows

# windows
python -m venv 
# To activate
#C:\Users\..\
.\Scripts\activate.bat

Example 2: how to activate a venv in windows

\env\Scripts\activate.bat

Example 3: activate virtualenv windows

venv\Scripts\activate

Example 4: create environment python windows 10

python3 -m venv venv

Example 5: create virtual environment python 3

python3 -m venv /path/to/new/virtual/environment

Example 6: how to use virtual environment python

python3 -m pip install --user virtualenv

Tags:

Misc Example