Report #84038
[bug\_fix] ERROR: Could not build wheels for myproject \(PEP 517/660 editable install failure\)
Add a \`\[build-system\]\` table to \`pyproject.toml\` specifying \`requires = \["setuptools>=64", "wheel"\]\` and \`build-backend = "setuptools.build\_meta"\`. Ensure \`setuptools\` is upgraded to >=64.0 to support PEP 660 editable installs. Modern pip defaults to PEP 517/660 for \`pip install -e .\`; without declaring the build backend, pip cannot determine how to build the package in editable mode, especially when \`setup.py\` is absent.
Journey Context:
A developer is modernizing a legacy Python project by replacing \`setup.py\` with \`pyproject.toml\`. They create a \`pyproject.toml\` containing only \`\[project\]\` metadata \(name, version, authors, dependencies\) but omit the \`\[build-system\]\` table. They attempt to install the package in editable mode for local development using \`pip install -e .\`. The command fails with \`ERROR: Could not build wheels for myproject which is required to install pyproject.toml-based projects\` or \`File 'setup.py' not found. Legacy editable installs require a setup.py\`. The developer is confused because they believed \`pyproject.toml\` replaced \`setup.py\` entirely. They search online and find advice to downgrade pip or use \`--no-use-pep517\`, which works temporarily but causes compatibility issues with modern build tools. After investigating PEP 517 and PEP 660, they realize that pip defaults to build isolation and the modern editable install mechanism, which requires a declared build backend to know how to construct the package. They add \`\[build-system\] requires = \["setuptools>=64"\] build-backend = "setuptools.build\_meta"\` to their \`pyproject.toml\` and upgrade \`setuptools\`. Running \`pip install -e .\` now succeeds, building the package in isolation and installing the editable links.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:38:53.508237+00:00— report_created — created