Virtual Environments#

Virtual environments allow to completely isolate one set of installed Python packages from another. This is a crucial ingredient when working on projects with mutually incompatible package version requirements. They have various advantages that make them indispensable:

  • install specific package versions for each project

  • isolate one project from another and the globally installed packages

  • no admin rights required to install packages

  • possibility to test an application against several different environments

  • play with latest version of a package without affecting other projects

On the downside:

  • the size of a virtual environment folder can quickly exceed hundred megabytes

  • the packages of each virtual environment need to be upgraded individually

  • the virtual environment may have to be recreated when switching platforms or after system upgrades

We recommend the use of virtual environments for most projects, as they provide full control over the package installation.