Report #15540
[bug\_fix] Editable install fails with pyproject.toml \(missing build\_editable hook\)
Upgrade \`pip\` to >= 21.3 and \`setuptools\` to >= 64.0.0 to support PEP 660 editable installs. Alternatively, use \`pip install -e . --config-settings editable\_mode=compat\` for legacy compatibility mode. Root cause: PEP 660 standardized editable installs for \`pyproject.toml\`-based builds. Older versions of pip lack the \`build\_editable\` hook support, and older setuptools lack the backend implementation, causing the build to fail when it tries to create an editable wheel.
Journey Context:
You're modernizing a project by migrating from \`setup.py\` to \`pyproject.toml\`. You set \`\[build-system\] requires = \["setuptools>=45", "wheel"\]\` and \`\[project\]\` metadata. You clone a fresh copy and run \`pip install -e .\` to install in editable mode for development. You get \`ERROR: Project file:///home/user/project has a 'pyproject.toml' and its build backend is missing the 'build\_editable' hook\`. You check your setuptools version—it's 58.0.0. You search the error and find PEP 660. You realize that while setuptools 45\+ supports pyproject.toml, the editable install hook \(\`build\_editable\`\) was only added in setuptools 64.0.0. You also need pip 21.3\+ to invoke it. You run \`pip install --upgrade pip setuptools\` to get pip 23.x and setuptools 68.x. You retry \`pip install -e .\` and it succeeds, creating a \`.pth\` file in site-packages pointing to your source directory via the modern PEP 660 mechanism.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:22:20.708240+00:00— report_created — created