python
config_error
ai_generated
true
ERROR: File "setup.py" not found. Cannot perform editable install without a build backend.
ID: python/pip-editable-install-missing-pyproject
80%Fix Rate
87%Confidence
0Evidence
2025-08-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.x | active | — | — | — |
Root Cause
pip install -e . requires either setup.py or a [build-system] table in pyproject.toml to define an editable-capable backend.
generic中文
pip install -e . 需要 setup.py 或 pyproject.toml 中的 [build-system] 表来定义支持可编辑安装的后端。
Workarounds
-
95% success
Add a build-system table to pyproject.toml: [build-system]\nrequires = ["setuptools>=61", "wheel"]\nbuild-backend = "setuptools.build_meta"
-
90% success
Use a hatchling backend for pure-Python projects: [build-system]\nrequires = ["hatchling"]\nbuild-backend = "hatchling.build"
-
92% success
Migrate to a PEP 621 [project] table and re-run pip install -e .
Dead Ends
Common approaches that don't work:
-
85% fail
An empty setup.py declares no package metadata, so the editable install produces no importable package.
-
90% fail
Disabling isolation does not provide a build backend; the error persists.
-
70% fail
Installs a copy, so source edits are not reflected, defeating the purpose of -e.