1python3 -m venv env
2python -m virtualenv env #py2
3
4source env/bin/activate
5
6#all this is on same directory
7
1# Create the virtual environment.
2python -m venv venv
3
4# Activate the env.
5venv\Scripts\activate.bat
1pip install virtualenv
2cd projectfolder #go to project folder
3virtualenv projectname #create the folder projectname
4source projectname/bin/activate
1Install venv with this command:
2 pip install virtual env
3
4Create a directory and type the following command in terminal:
5 python -m venv virtual <-- "The last word in command is the name of the venv, you can call it whatever you want."
6
7Activate virtual environment:
8 source virtual/bin/activate
1#Creating a Virtual Environment | Windows 10
2#Proceed to the folder were you want to create your environment, Then enter the following:
3...\> py -m venv project_name
4#To activate the environment, run:
5...\> project_name\Scripts\activate.bat
6#Then install Django using pip
7...\> py -m pip install Django