python install_error ai_generated true

错误:foo-1.2.3-cp311-cp311-win_amd64.whl 不是此平台支持的 wheel。

ERROR: foo-1.2.3-cp311-cp311-win_amd64.whl is not a supported wheel on this platform.

ID: python/pip-wheel-not-supported-on-this-platform

其他格式: JSON · Markdown 中文 · English
80%修复率
90%置信度
0证据数
2024-04-17首次发现

版本兼容性

版本状态引入弃用备注
3.9 active — — —
3.10 active — — —
3.11 active — — —
3.12 active — — —

根因分析

wheel 的平台/ABI 标签与当前解释器不匹配(例如在 Linux 上使用 Windows wheel,或在 cp310 上使用 cp311 wheel)。

English

The wheel's platform/ABI tag does not match the current interpreter (e.g., a Windows wheel on Linux, or cp311 wheel on cp310).

generic

解决方案

  1. 95% 成功率
    Download the wheel matching your platform:
      pip download --only-binary=:all: --platform manylinux2014_x86_64 --python-version 311 --abi cp311 foo
    Or simply: pip install foo (pip picks the right wheel).
  2. 70% 成功率
    Build from source if no matching wheel exists:
      pip install --no-binary=:all: foo
    (requires a compiler toolchain).

无效尝试

常见但无效的做法:

  1. 95% 失败

    Force-reinstall does not change the platform compatibility check.

  2. 90% 失败

    Renaming breaks the internal RECORD and the wheel may still contain native code for the wrong platform.