Caffeinated Coder
Book an appointment
Lesson 16 · Real programs

Virtual environments and pip

Real programs lean on packages other people wrote, and pip installs them from PyPI. But one Python has one site-packages folder, so two projects that need different versions clash. A virtual environment gives each project its own python and its own site-packages. Step through six commands: make a venv, activate it, install requests from a requirements.txt, run app.py, then leave the venv and watch the same file fail.

12 min9 steps5 questionsIntermediate
Fig 16 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.