later from 16.04
install pip3 if you don't have already
$ sudo apt-get install python3-pip
$ sudo pip3 install virtualenv
$ cd $YOUR_PROJECT_DIRECTORY
$ virtualenv .venv
.venv or any $NAME
for your virtualenv
$ source .venv/bin/activate
$ deactivate
You can also use Python2.7
interpreter for your virtualenv
but I would not recommend that since Python 2.7 will not be maintained after January 1, 2020. But if you like to:
$ virtualenv -p /usr/bin/python2.7 venv