Virtual Environments (Slideshow)

Problems Solved

  • Python installation is global

  • Worse: pip installed packages are global

  • Packages available in different versions

  • Different projects might require a package in different versions ⟶ conflicts!

Solution

  • Creates “sandboxed” Python environment

  • Integrates nicely with pip

  • Integrates nicely with version control

    • Nobody wants to version control an entire environment

  • “Freeze” ⟶ Manifest file

    • Usually called requirements.txt

    • Version controlled inside (together with) the project

    • Updated as requirements change