pip install virtualenv # install first
cd projectfolder # go to project folder
python -m venv ./venv # Create a virtual environment named venv
Activate.ps1 # (powershell) start the file to start the environment
activate.bat # (cmd) start the file to start the environment
# if it worked you'll see a (venv) in front of your cursor path
# First install virtualenv
!pip3 install virtualenv
# Go to the desired directory which you wish you run your virtual environment.
cd project_directory
# create a virtual environment called my_virtualenv
virtualenv my_virtualenv
### to run the virtual environemt run "activate" as in the following command
.my_virtualenvScriptsactivate
# for Ubuntu
# first install virtualenv using
sudo apt install python3-virtualenv
# then run
virtualenv -p python3 MyFirstApp
# to activate virtual env
source MyFirstApp/bin/activate
# after activating virtual env, create your django project, etc
Create a directory
$ mkdir Dev
Move in the directory
$ cd Dev
You can also create a sub directory
$ mkdir penv
Create the virtual environment
$ python3.6 -m venv .
Note that the period '.' signifies that the virtual envrionment is being create in the
present directory not a sub directory
To activate the virtual environment
$ source bin/activate
To exit the virtual environment
$ deactivate