1#------FOR LINUX/MAC---------#
2#installing venv
3sudo apt-get install python3.6-venv
4#creating virtual env
5python3 -m venv env
6#activating virtual env
7source env/bin/activate
8
9
10#-------FOR WINDOWS----------#
11#installing venv
12py -m pip install --user virtualenv
13#creating virtual env
14py -m venv env
15#activating virtual env
16.\env\Scripts\activate
17
1# Create the virtual environment.
2python -m venv venv
3
4# Activate the env.
5venv\Scripts\activate.bat
1# CREATE FOLDER FOR A PROJECT
2mkdir project_folder
3cd project_folder
4
5# CREATE VIRTUAL ENVIRONMENT
6python3.7 -m venv myvenv
7# or alternativelly
8virtualenv myvenv --python=python3.7
9
10# ACTIVATE VIRTUAL ENVIRONMENT
11source myvenv/bin/activate
1pip install virtualenv
2cd projectfolder #go to project folder
3virtualenv projectname #create the folder projectname
4source projectname/bin/activate
1pip install virtualenv # install first
2cd projectfolder # go to project folder
3python -m venv ./venv # Create a virtual environment named venv
4Activate.ps1 # (powershell) start the file to start the environment
5activate.bat # (cmd) start the file to start the environment
6# if it worked you'll see a (venv) in front of your cursor path
1#create the venv
2python -m venv name_virtual_env
3 #or
4python3 -m venv name_virtual_env
5
6#activate venv
7 #linux:
8source name_virtual_env/bin/activate
9
10 #windows
11name_virtual_env\Scripts\activate