Quick notes on Python virtual environments
There are many reason why someone would want to install certain software packages to a Python virtual environment instead of using the system package manager. In general, the use of Python virtual environments is recommended when:
- the package you want to install is at an early stage of development, and is not yet available in a public release format through PyPi (meaning you can't simply do 'pip install mymodule' in your terminal because the package is not available in PyPi).
- your operating system does not provide a specific version of Python that is required to run the code.
- you are working as a developer on a project.
- you want to test the code in multiple Python versions.
- you want to meet certain library dependencies by installing them to an isolated system environment that does not affect the global scope of the user.
This is an incomplete list of reasons, but I hope these are enough to give the general sense of why and when to use Python virtual env