Use python virtual environment

To create a virtualenv in python 3 type:

python3 -m venv /path/to/environment

Start your new venv

source venv/bin/activate

Stop virtualenv

deactivate

Export python libraries

pip freeze > requirements.txt

Install necessary libraries

pip install -r requirements.txt

Source