Skip to content
Latchkey

pip "build-system.requires section is missing" in CI

PEP 518 says a [build-system] table must include a requires key that is a list of dependency strings. If requires is absent, empty in the wrong way, or not a list, pip refuses the build with a build-system.requires error before any backend runs.

What this error means

pip aborts early with a message that the project's pyproject.toml [build-system] table is missing the requires key or that requires must be a list of strings.

pip
ERROR: Some build dependencies for file:///project conflict with the backend dependencies: ...
# or, with a malformed table:
The [build-system] table in pyproject.toml is missing the required 'requires' key.

Common causes

A [build-system] table with no requires key

You added build-backend but forgot requires. PEP 518 mandates both, so pip rejects the table.

requires is not a list of strings

Writing requires = "setuptools" (a string) instead of requires = ["setuptools"] (a list) violates the schema.

How to fix it

Provide requires as a TOML list

  1. Open the [build-system] table in pyproject.toml.
  2. Set requires to a list of dependency strings.
  3. Re-run the build.
pyproject.toml
[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"

Validate the table before committing

Run a quick TOML parse so a malformed [build-system] never reaches CI.

Terminal
python -c "import tomllib,sys; d=tomllib.load(open('pyproject.toml','rb')); print(d['build-system']['requires'])"

How to prevent it

  • Always pair build-backend with a requires list.
  • Keep requires a list of strings, never a bare string.
  • Lint pyproject.toml in CI with a validator.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →