---
source: https://iinventedlight.com/library/notes/pip-requirements-files.md
title: "pip requirements files list install items, includes, and constraints"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (pip docs); MIT (pypa/pip (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: pip docs, Requirements File Format, MIT (https://raw.githubusercontent.com/pypa/pip/main/LICENSE.txt); pypa/pip (GitHub), Requirements File Format (pip source docs), MIT (https://raw.githubusercontent.com/pypa/pip/main/LICENSE.txt)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-16
as_of: 2026-11-16
confidence: medium
untested: "Not reproduced (2026-11-16). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-python: pip requirements files"
tags: [pip, requirements, constraints, python]
client: Librarian
sources:
  - id: S1
    title: "Requirements File Format"
    publisher: pip docs
    url: https://pip.pypa.io/en/stable/reference/requirements-file-format/
    accessed: 2026-11-16
    license: "MIT"
  - id: S2
    title: "Requirements File Format (pip source docs)"
    publisher: pypa/pip (GitHub)
    url: https://github.com/pypa/pip/blob/main/docs/html/reference/requirements-file-format.md
    accessed: 2026-11-16
    license: "MIT"
---
# pip requirements files list install items, includes, and constraints
**Answer:** Requirements files serve as a list of items to be installed by pip. Files that use this format are often called "pip requirements.txt files". `requirements.txt` is usually what these files are named, although that is not a requirement.

Each line of the requirements file indicates something to be installed. A line that begins with `#` is treated as a comment and ignored. It is possible to refer to other requirement files or constraints files. Use `-r other-requirements.txt` and `-c constraints.txt`.

The basic format is relatively stable and portable. The full syntax is only intended for consumption by pip.

## See also

- [python-venv](https://iinventedlight.com/library/notes/python-venv/)
- [python-pathlib](https://iinventedlight.com/library/notes/python-pathlib/)
- [github-actions-setup-python](https://iinventedlight.com/library/notes/github-actions-setup-python/)
- [uv-python-package-manager](https://iinventedlight.com/library/notes/uv-python-package-manager/)

## Claims

- id: C1
  claim: Requirements files list items to be installed by pip.
  source: S1
  evidence: "Requirements files serve as a list of items to be installed by pip, when"

- id: C2
  claim: The usual filename is requirements.txt, but that name is not required.
  source: S1
  evidence: "although, that is not a requirement"

- id: C3
  claim: A line that begins with # is a comment and is ignored.
  source: S2
  evidence: "A line that begins with `#` is treated as a comment and ignored."

- id: C4
  claim: You can refer to other requirements files with -r.
  source: S2
  evidence: "-r other-requirements.txt"

## Sources

- [S1] Requirements File Format. pip docs. https://pip.pypa.io/en/stable/reference/requirements-file-format/ . License: MIT. Accessed 2026-11-16.

- [S2] Requirements File Format (pip source docs). pypa/pip (GitHub). https://github.com/pypa/pip/blob/main/docs/html/reference/requirements-file-format.md . License: MIT. Accessed 2026-11-16.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: pip docs, Requirements File Format, MIT (https://raw.githubusercontent.com/pypa/pip/main/LICENSE.txt); pypa/pip (GitHub), Requirements File Format (pip source docs), MIT (https://raw.githubusercontent.com/pypa/pip/main/LICENSE.txt). Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
