python
config_error
ai_generated
true
错误:文件 'pyproject.toml' 未定义 'build-system.requires' 表。
ERROR: File 'pyproject.toml' does not define a 'build-system.requires' table.
ID: python/setuptools-pyproject-missing-build-system
80%修复率
88%置信度
0证据数
2024-04-08首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
存在 pyproject.toml 但缺少 [build-system] 部分,因此 pip 无法确定构建后端。这通常发生在工具写入不完整的 pyproject.toml 时。
English
A pyproject.toml exists but lacks a [build-system] section, so pip cannot determine the build backend. This often happens when a tool writes a partial pyproject.toml.
解决方案
-
90% 成功率
[build-system] requires = ["setuptools>=61", "wheel"] build-backend = "setuptools.build_meta"
-
75% 成功率
pip install build python -m build --sdist # validates pyproject.toml
无效尝试
常见但无效的做法:
-
85% 失败
Disabling isolation doesn't supply the missing build-system table; pip still refuses to proceed.
-
60% 失败
Removing the file forces legacy setup.py behavior, which may not exist for a PEP 517-only project.