</>CodexBash
All articles
Python and JavaScript

Python virtual environments

Why every Python project needs its own environment, creating and activating one with venv on Windows, macOS and Linux, installing packages, recording them in requirements.txt, and how uv and Poetry fit in.

CodexBash, , 4 min read

Install a package for one Python project and it can break another. Project A needs Django 4, project B needs Django 5, and they cannot both be "the" Django on your computer. A virtual environment solves that: each project gets its own private set of installed packages. It is the first habit every Python developer should learn, and it takes one command.

Sign in to read the rest

The whole 4 minute article is free with an account, along with every problem, lesson and tutorial. No card.