see virtualenv python code example
Example 1: create a virtual environment python 3
python3 -m venv /path/to/new/virtual/environment
Example 2: python virtual env
$ cd project_folder
$ virtualenv venv
python3 -m venv /path/to/new/virtual/environment
$ cd project_folder
$ virtualenv venv