Report #101466
[bug\_fix] pip install -e . fails for a pyproject.toml project or reports that an editable install is not possible
Ensure your project has a \`\[build-system\]\` table in \`pyproject.toml\`, for example: \`\[build-system\] requires = \["setuptools>=64", "wheel"\]; build-backend = "setuptools.build\_meta"\`. Then use pip >=21.3 and setuptools >=64 and run \`python -m pip install -e .\` from the project root. If you use another backend \(hatchling, flit-core, poetry-core\), set \`build-backend\` accordingly and ensure the backend supports PEP 660 editable installs.
Journey Context:
You clone a modern Python project and run \`pip install -e .\`; pip complains that an editable install is not possible or falls back to a legacy \`setup.py develop\` that fails. You have a \`pyproject.toml\` but no \`\[build-system\]\` table, so pip doesn't know which backend to ask for the editable wheel. The root cause is that editable installs for pyproject.toml builds are standardized by PEP 660: the frontend \(pip\) calls \`build\_editable\` on the declared build backend. Without \`build-backend\` and a new-enough setuptools, that hook is missing. Adding the table and using up-to-date tools enables the PEP 660 hook, producing a .pth link in site-packages that points back to your source directory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-07T04:54:05.327135+00:00— report_created — created