python
install_error
ai_generated
true
错误:无法为 some-package 构建 wheel,这是安装基于 pyproject.toml 的项目所必需的
ERROR: Could not build wheels for some-package, which is required to install pyproject.toml-based projects
ID: python/pip-build-isolation-missing-build-dependencies
80%修复率
86%置信度
0证据数
2024-11-15首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
pip 尝试在隔离环境中构建 wheel,但失败,因为 pyproject.toml 中指定的构建依赖不可用或无法安装,通常是由于网络问题或缺少系统库。
English
pip attempted to build a wheel in an isolated environment but failed because the build dependencies specified in pyproject.toml are not available or cannot be installed, often due to network issues or missing system libraries.
解决方案
-
85% 成功率
Install build dependencies manually: pip install build, then run python -m build to see detailed errors, and install missing system packages (e.g., libffi-dev, python3-dev).
-
75% 成功率
Use a pre-built wheel if available: pip install --only-binary :all: some-package.
无效尝试
常见但无效的做法:
-
70% 失败
Requires build dependencies to be already installed in the current environment; often they are not, leading to different errors.
-
80% 失败
Does not resolve missing system libraries or network issues.