ERROR pip platform_error ai_generated partial

ERROR: Could not find a version that satisfies the requirement <package>. No matching distribution found (no binary available for this platform)

ID: pip/no-binary

Also available as: JSON · Markdown
75%Fix Rate
82%Confidence
50Evidence
2022-06-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
24 active

Root Cause

No prebuilt binary wheel is available for the current platform/Python combination. The package needs to be compiled from source, which requires build tools and libraries. Common on Alpine Linux (musl), ARM, or newer Python versions.

generic

Workarounds

  1. 80% success Install build dependencies and compile from source
    apt-get install build-essential python3-dev && pip install --no-binary <package> <package>
  2. 90% success Use a manylinux-compatible base image instead of Alpine/musl
    Switch Docker base from python:3.x-alpine to python:3.x-slim which uses glibc and has wheel support
  3. 85% success Build the wheel yourself and host it in a private index
    pip wheel <package> -w ./dist/ on a compatible machine, then pip install --find-links ./dist/ <package>

Dead Ends

Common approaches that don't work:

  1. Use --only-binary :all: to force binary-only installs 99% fail

    If no binary exists for the platform, this flag guarantees failure instead of attempting source build

  2. Try different PyPI mirrors hoping they have the binary 90% fail

    Mirrors replicate the same packages; if PyPI does not have the wheel, mirrors will not either

Error Chain

Leads to:
Preceded by:
Frequently confused with: