python 3 venv code example
Example 1: creating venv python3
mkdir project_folder
cd project_folder
python3.7 -m venv myvenv
virtualenv myvenv --python=python3.7
source myvenv/bin/activate
Example 2: python create virtualenv
pip install virtualenv
cd projectfolder
python -m venv ./venv
Activate.ps1
activate.bat
Example 3: create a virtual environment python 3
python3 -m venv /path/to/new/virtual/environment
Example 4: python install library in virtualenv
1º - Instal Python3 and pip3
2º - Create a folder for your virtual environment:
>> cd "path_to_the_place_you_want_to_locate_your_folder"
>> python3 -m venv "name_of_env"
3º - Activate this virtual environment:
>> source "name_of_env"/bin/activate
4º - Now you can install new things inside this environment:
>> pip3 install django
Example 5: creating a virtual environment in python 3.8
c:\>python -m venv c:\path\to\myenv
Example 6: python3 -m venv venv
$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";C:\Users\Admin\Ubuntu", "User")