python
system_error
ai_generated
true
错误:为 mypackage 构建 wheel 失败 错误:命令 'cmake' 失败:没有那个文件或目录
ERROR: Failed building wheel for mypackage error: command 'cmake' failed: No such file or directory
ID: python/pip-wheel-building-failure
80%修复率
87%置信度
0证据数
2024-02-14首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
根因分析
该包需要构建工具(如 cmake),但系统上未安装。
English
The package requires a build tool (like cmake) that is not installed on the system.
解决方案
-
90% 成功率 Install cmake and ensure it is in PATH
On Ubuntu: `sudo apt-get install cmake`. On macOS: `brew install cmake`. Verify with `cmake --version`.
-
75% 成功率 Use a pre-built wheel from PyPI or a third-party index
`pip install --only-binary=:all: mypackage` or download a .whl file and install with `pip install mypackage.whl`
无效尝试
常见但无效的做法:
-
Installing cmake but not adding it to PATH
50% 失败
pip cannot find the cmake executable if it's not in PATH.
-
Using --no-build-isolation to use system-installed cmake
80% 失败
If cmake is not installed at all, this flag does not help.