Report #25277
[bug\_fix] PEP 517 build isolation missing build dependencies
Install with \`pip install --no-build-isolation .\` after manually installing the build system requirements \(e.g., \`pip install setuptools wheel\`\), or ensure \`pyproject.toml\` has a valid \`\[build-system\]\` table with \`requires\` and use a network-connected environment so pip can auto-install them in the isolated build environment.
Journey Context:
Developer clones a repository with a \`pyproject.toml\` containing \`\[build-system\] requires = \["setuptools>=45", "wheel", "Cython"\]\`. They have an older pip \(19.0\) or a newer pip in an air-gapped environment. They run \`pip install .\` and see "Getting requirements to build wheel ... error" with "ModuleNotFoundError: No module named 'setuptools'" or "No module named 'Cython'". They verify \`pip list\` shows setuptools is installed in the current environment. They don't understand why the build fails to find it. The issue is PEP 517/518 build isolation: pip creates an isolated environment for building the package, containing only the dependencies listed in \`\[build-system\] requires\`. If Cython or a specific setuptools version isn't listed there, or if pip cannot download them due to network restrictions, the isolated build environment lacks these build dependencies. The developer tries \`pip install --no-build-isolation .\`, which builds the package using the current environment's installed packages \(including setuptools and Cython\), bypassing the isolated environment. This succeeds if the current environment has all necessary build tools. Alternatively, fixing \`pyproject.toml\` to correctly list all build dependencies and ensuring pip can reach PyPI allows the standard isolated build to work, which is preferred for reproducibility.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:49:51.133100+00:00— report_created — created