To start, first create a directory
mkdir directory_name
Enter the directory
cd directory_name
Create a virtualenv
python3 -m venv venv_name
Remark: The name of your virtual environment is myvenv_name
To activate a your virtual environment, do the following
cd venv_name
cd bin
source activate
Remark: You can activate your virtual enviroment in a single command
source venv_name/bin/activate
To know that your virtual environment was successfully activated, the following should appear on the console
(venv_name) ~/home/directory_name/venv_name/bin
Remark: Do not forget to return to the directory directory_name with cd ..
To deactivate a your virtual environment, do the following
(venv_name) ~/home/directory_name/venv_name deactivate