Just one version of a given Python library may be used by all of your applications when installing packages globally. This implies that version incompatibilities will crop up rather rapidly.
These issues may be avoided by creating many isolated Python environments, or “virtual environments.” They provide the option of using multiple versions of the Python interpreter and separating Python requirements per project.
The abbreviation “virtualenv” or “venv” refers to a Python virtual environment. It resides in a subdirectory that contains all the packages and other dependencies (such as the interpreter runtime and native-code libraries) that a Python project need.
Here’s a brief tutorial on utilizing virtual environments as a “sandbox” in Python by creating a new environment (or virtualenv, as they’re sometimes abbreviated) and installing a third-party package into it using the pip function.