python
install_error
ai_generated
true
错误:无法为 foo 构建 wheel,而这是安装基于 pyproject.toml 的项目所必需的。
ERROR: Could not build wheels for foo, which is required to install pyproject.toml-based projects
ID: python/pip-build-isolation-missing-build-dependency
80%修复率
86%置信度
0证据数
2024-04-05首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
根因分析
构建后端需要未在 build-system.requires 中声明的工具(如 Cython、numpy),而构建隔离隐藏了它们。
English
Build backend requires tools (e.g., Cython, numpy) not declared in build-system.requires, and build isolation hides them.
解决方案
-
85% 成功率
pip install -U pip setuptools wheel cython numpy pip install foo
-
80% 成功率
pip install --only-binary=:all: foo
无效尝试
常见但无效的做法:
-
55% 失败
Requires all build tools pre-installed globally; often fails with missing headers or wrong versions.
-
90% 失败
Transient network issues aside, missing build deps won't resolve by retrying.