# 错误：找不到用于构建项目的后端。该项目使用的构建后端未安装。

- **ID:** `pip/pep-517-backend-not-found`
- **领域:** pip
- **类别:** build_error
- **验证级别:** ai_generated
- **修复率:** 82%

## 根因

pyproject.toml 指定了一个构建后端（例如 flit_core、poetry-core、mesonpy），但在构建环境中不可用，通常是因为它没有被列为 build-system.requires 依赖。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| pip 21.3+ | active | — | — |
| Python 3.9-3.12 | active | — | — |

## 解决方案

1. ```
   Add the missing backend to pyproject.toml under [build-system] requires:
[build-system]
requires = ["flit_core>=3.2"]
build-backend = "flit_core.buildapi"
Then re-run pip install.
   ```
2. ```
   Install the package without build isolation: pip install --no-build-isolation <package>. Ensure the backend is pre-installed in the environment.
   ```
3. ```
   Upgrade pip to the latest version: python -m pip install --upgrade pip, which may improve backend detection.
   ```

## 无效尝试

- **** — Pip's build isolation ignores the global environment; the backend must be declared in pyproject.toml's build-system.requires. (85% 失败率)
- **** — Modern packages may not include setup.py; removing pyproject.toml can break the build entirely. (70% 失败率)
- **** — This can cause version conflicts or missing dependencies, and is discouraged by pip maintainers. (60% 失败率)
