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

Also available as: JSON · Markdown · 中文
80%Fix Rate
87%Confidence
0Evidence
2025-08-05First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
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

  1. 95% success
    Add a build-system table to pyproject.toml: [build-system]\nrequires = ["setuptools>=61", "wheel"]\nbuild-backend = "setuptools.build_meta"
  2. 90% success
    Use a hatchling backend for pure-Python projects: [build-system]\nrequires = ["hatchling"]\nbuild-backend = "hatchling.build"
  3. 92% success
    Migrate to a PEP 621 [project] table and re-run pip install -e .

Dead Ends

Common approaches that don't work:

  1. 85% fail

    An empty setup.py declares no package metadata, so the editable install produces no importable package.

  2. 90% fail

    Disabling isolation does not provide a build backend; the error persists.

  3. 70% fail

    Installs a copy, so source edits are not reflected, defeating the purpose of -e.