The venv module provides support for creating lightweight “virtual environments” with their own site directories, optionally isolated from system site directories. Each virtual environment has its own Python binary (which matches the version of the binary that was used to create this environment) and can have its own independent set of installed Python packages in its site directories.
https://docs.python.org/3/library/venv.html
python3 -m venv /path/to/new/virtual/environment
cd /path/to/new/virtual/environment source ./bin/activate
deactivate
Bash prompt, normal:
username@hostname:~/current/path$
Bash prompt, with virtual environment activated:
(current_dir) username@hostname:~/current/path$