python install_error ai_generated true

ERROR: File "/tmp/pip-build-env-xxxx/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 435, in get_requires_for_build_editable raise NotImplementedError("editable installs are not supported by this backend")

ID: python/pip-editable-install-fails-pep660

Also available as: JSON · Markdown · 中文
80%Fix Rate
85%Confidence
0Evidence
2024-08-14First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.9 active
3.10 active
3.11 active
3.12 active

Root Cause

`pip install -e .` uses PEP 660 editable wheels, but the project's build backend (or an old setuptools) does not implement `build_editable`.

generic

中文

`pip install -e .` 使用 PEP 660 可编辑 wheel,但项目的构建后端(或旧版 setuptools)未实现 `build_editable`。

Workarounds

  1. 90% success
    Upgrade setuptools so PEP 660 is supported: `pip install --upgrade 'setuptools>=64'`, then `pip install -e .`.
  2. 75% success
    Fall back to legacy editable: `pip install -e . --config-settings editable_mode=compat` (setuptools) or switch the backend to one that supports PEP 660.

Dead Ends

Common approaches that don't work:

  1. 80% fail

    Still calls the backend's build_editable hook, which is unimplemented.

  2. 85% fail

    PEP 517 is already the default; the hook is missing regardless.