16
Dependencies and Virtual Environments
Python runs in an environment defined by the OS. There are some slight differences between Windows, macOS, and most Linux environments. We’ll set aside micro-controller environments, since the ability to tailor those environments is quite a bit more involved. We’ll try to minimize the OS differences to focus on the common aspects that are universally available.
There are several common aspects within run-time environments. We can divide these into two groups:
Persistent
Aspects of the environment that change slowly.
The Python run-time in use. This includes a binary application and often includes a number of external libraries.
The standard libraries available. These are accessed via the importer, and are generally available via the import statement. They are generally found by their path, relative to the Python binary.
The other libraries installed as site packages. These are also...