python install_error ai_generated true

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

Also available as: JSON · Markdown · 中文
80%Fix Rate
90%Confidence
0Evidence
2024-04-17First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.9 active — — —
3.10 active — — —
3.11 active — — —
3.12 active — — —

Root Cause

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

中文

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

Workarounds

  1. 95% success
    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% success
    Build from source if no matching wheel exists:
      pip install --no-binary=:all: foo
    (requires a compiler toolchain).

Dead Ends

Common approaches that don't work:

  1. 95% fail

    Force-reinstall does not change the platform compatibility check.

  2. 90% fail

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