ERROR
pip
install_error
ai_generated
true
错误:<package>.whl 不是此平台支持的 wheel。它与当前 Python 解释器或平台不兼容。
ERROR: <package>.whl is not a supported wheel on this platform. It is not compatible with this Python interpreter or platform.
ID: pip/wheel-manylinux-incompatible
92%修复率
85%置信度
1证据数
2023-03-15首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| pip 21.0 | active | — | — | — |
| pip 23.0 | active | — | — | — |
| pip 24.0 | active | — | — | — |
根因分析
wheel 文件的平台标签(例如 manylinux2014_x86_64)与用户系统架构或 Python 版本不匹配,通常是因为下载了针对不同操作系统或 Python ABI 的 wheel。
English
The wheel file's platform tag (e.g., manylinux2014_x86_64) does not match the user's system architecture or Python version, often due to downloading a wheel for a different OS or Python ABI.
官方文档
https://pip.pypa.io/en/stable/cli/pip_install/#wheel-support解决方案
-
改为安装源码发行版:`pip install <package> --no-binary :all:`
-
下载适合你平台的 wheel:检查 Python 版本(`python3 -c 'import sys; print(sys.version)'`)和架构(`uname -m`),然后在 https://pypi.org/project/<package>/#files 找到兼容的 wheel
-
使用 `--platform` 和 `--python-version` 标志进行交叉编译:`pip install <package> --platform manylinux2014_x86_64 --python-version 3.10 --implementation cp --abi cp310`
无效尝试
常见但无效的做法:
-
Re-download the same wheel file from PyPI manually.
95% 失败
The wheel file itself is correct; the issue is platform incompatibility, not file corruption.
-
Use --no-index and point to a local wheelhouse without checking tags.
80% 失败
pip still validates platform tags even with --no-index; this flag only skips index lookup.
-
Force install with --force-reinstall ignoring warnings.
100% 失败
pip will abort with an error; --force-reinstall does not bypass platform tag checks.