Virtual Environments (Slideshow)#
Problems Solved#
Python installation is global
Worse:
pip
installed packages are globalPackages 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
Links#
Virtual Environments (Links)#
Python Tutorial: VENV (Mac & Linux) - How to Use Virtual Environments with the Built-In venv Module (Corey Schafer)