This tutorials will explain how to create, activate and deactivate virtual environment in python. Virtual environment is highly recommended for each project to keep dependent libraries separate for development from other projects.
Create virtual environment: Below command will create virtual environment folder with pass venv name(e.g sample_venv_name in this case) in the current working directory.
python3 -m venv sample_venv_name
source /path-to-virtual-env-folder/sample_venv_name/bin/activate
deactivate