# 错误：文件 "/tmp/pip-build-env-xxxx/overlay/lib/python3.11/site-packages/setuptools/build_meta.py"，第 435 行，在 get_requires_for_build_editable 中
    raise NotImplementedError("此构建后端不支持可编辑安装")

- **ID:** `python/pip-editable-install-fails-pep660`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

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

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

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

## 无效尝试

- **** — Still calls the backend's build_editable hook, which is unimplemented. (80% 失败率)
- **** — PEP 517 is already the default; the hook is missing regardless. (85% 失败率)
