requirements file

A text file, usually requirements.txt, listing the packages a project needs, one per line, often pinned to exact versions.

In more detail

pip install -r requirements.txt recreates the same set of packages on any machine, and pip freeze > requirements.txt writes one from the current environment. Commit it, and never the virtual environment itself.

Examples

requests==2.32.3
certifi==2025.8.3
A generated requirements.lock with a digest beside every pin, installed with --require-hashes, is the course's Python lockfile.

Related terms

Taught in

References