Sharing what has worked for me in both Ubuntu and Windows. This is for python3. To do for python2, replace "3" with "2":
pip install virtualenv --user
virtualenv -p python3 /tmp/VIRTUAL
source /tmp/VIRTUAL/bin/activate
which python3
To install any package: pip install package
To get out of the virtual environment: deactivate
To activate again: source /tmp/VIRTUAL/bin/activate
(Assuming you have MiniConda installed and are in the Start Menu > Anaconda > Anaconda Terminal)
conda create -n VIRTUAL python=3
activate VIRTUAL
To install any package: pip install package
or conda install package
To get out of the virtual environment: deactivate
To activate again: activate VIRTUAL