Report #92239
[bug\_fix] PEP 517 build isolation missing build dependencies
Disable build isolation with \`pip install --no-build-isolation .\` after manually installing build deps, or add missing build dependencies \(setuptools, wheel, Cython, numpy\) to \`\[build-system\]\` requires in \`pyproject.toml\`.
Journey Context:
Developer clones a repository with C extensions \(e.g., a scientific computing library\) and runs \`pip install .\`. The package has a \`pyproject.toml\` specifying \`build-system = \{requires = \["setuptools", "wheel"\]\}\` but the C extension requires \`numpy\` headers to be present during build \(\`\#include \`\). The build fails with \`numpy/arrayobject.h: No such file or directory\` even though numpy is installed in the current virtualenv. Developer tries upgrading pip, installing setuptools globally, but the error persists. They examine the error logs and see pip is creating a temporary isolated environment for building, installing only setuptools and wheel \(as per pyproject.toml\), but not numpy. The build runs gcc in that isolated env where numpy isn't present. Developer searches and finds references to PEP 517 build isolation. The root cause is that PEP 517 mandates that builds happen in isolation by default, ignoring the currently installed packages unless they are listed in \`build-system requires\` in pyproject.toml. Many scientific packages require numpy to be present before setup.py runs \(for includes\), but if not declared in build-system requires, it's missing. The fix is to either add \`numpy\` to the \`\[build-system\]\` requires in pyproject.toml \(if maintaining the package\), or as a consumer, disable build isolation with \`pip install --no-build-isolation .\` after manually installing all build dependencies \(numpy, cython, etc.\) in the current environment.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:24:50.175252+00:00— report_created — created