windows activate virtual environment python code example
Example 1: create a venv
# Create the virtual environment.
python -m venv venv
# Activate the env.
venv\Scripts\activate.bat
Example 2: how to activate a venv in windows
\env\Scripts\activate.bat
Example 3: creating virtual environment python
python3 -m venv tutorial-env
#name : tutorial-env
tutorial-env\Scripts\activate #activate env
deactivate #deactivate env
Example 4: activate virtualenv windows
venv\Scripts\activate
Example 5: start python virtual
activate venv
Example 6: 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