python
install_error
ai_generated
true
错误:为 package_name 构建 wheel 失败
ERROR: Failed building wheel for package_name
ID: python/pip-build-deps-not-installed
80%修复率
84%置信度
0证据数
2024-05-20首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
根因分析
缺少具有本地扩展的包的构建依赖项(如编译器、头文件)。
English
Missing build dependencies (e.g., compiler, headers) for a package with native extensions.
解决方案
-
90% 成功率 Install system build tools
apt-get install build-essential (Linux) or xcode-select --install (macOS)
-
60% 成功率 Use a pre-built wheel if available
pip install package_name --only-binary :all:
无效尝试
常见但无效的做法:
-
Installing the package with --no-cache-dir
40% 失败
Cache is not the issue; missing dependencies remain.
-
Upgrading pip to latest
30% 失败
Pip version doesn't provide system build tools.