instal venv python code example
Example 1: how to create a python venv
python3 -m venv tutorial-env
Example 2: how to use virtual environment python
python3 -m pip install --user virtualenv
Example 3: python virtual environment
source env/bin/activate
Example 4: activate venv in python
$ source ~/envs/tutorial-env/bin/activate
(tutorial-env) $ python
Python 3.5.1 (default, May 6 2016, 10:59:36)
...
>>> import sys
>>> sys.path
['', '/usr/local/lib/python35.zip', ...,
'~/envs/tutorial-env/lib/python3.5/site-packages']
>>>