Skip to content

Virtualenv

An isolated Python environment: every project has its own set of dependencies that does not overlap with the others.

Why

Different projects require different versions of libraries. Without isolation, updating one project breaks another.

Usage

python -m venv .venv
.venv\Scripts\activate   # Windows
source .venv/bin/activate  # Linux/macOS
pip install -r requirements.txt

See Also

← All Terms