$ pip install virtualenv
$ virtualenv --version
# Creating env
$ virtualenv [--no-site-packages] [--python=/usr/bin/python2.7] env-name
$ lsvirtualenv
# activate env
$ source env-name/bin/activate
# install any desired packages here specific for the current virtual-env
$ pip install some-package
# installing from a list of packages
$ pip install -r requirements.txt
# creating a list of currently installed packages
$ pip freeze > requirements.txt
# Deactivate env
$ deactivate
# to delete env, simply delete the folder
# create env
$ conda create --name my-env [python=3.6]
# list environments
$ conda info --envs
# activate
$ source activate my-env
# install anay packages here if needed
# deactivate
$ source deactivate
# remove env
$ conda remove --name my-env
Ref: https://www.freecodecamp.org/news/python-virtual-environments-explained-with-examples