create virtualenv python windows 10 code example
Example 1: how to activate a venv in windows
\env\Scripts\activate.bat
Example 2: how to create virtualenv in specific directory in windows
Create a Virtual Python Environment
cd to your project directory and run virtualenv to create the new virtual environment.
The following commands will create a new virtual environment under my-project/my-venv.
cd my-project
virtualenv --python C:\Path\To\Python\python.exe venv
Example 3: how to activate virtual environment in python windows 10
name_of_env\Scripts\activate
Example 4: activate virtual environment python windows 10
cd C: Path to virtual environment> .\activate