1# Create the virtual environment.
2python -m venv venv
3
4# Activate the env.
5venv\Scripts\activate.bat
1# First install virtualenv
2!pip3 install virtualenv
3
4# Go to the desired directory which you wish you run your virtual environment.
5cd project_directory
6
7# create a virtual environment called my_virtualenv
8virtualenv my_virtualenv
9
10### to run the virtual environemt run "activate" as in the following command
11.\my_virtualenv\Scripts\activate
1if you configured the PATH and PATHEXT variables for your Python installation:
2
3c:\>python -m venv c:\path\to\myenv