{"id":"79b78c7f6b6bbf53","repo":"pypa/pip","slug":"wheel-filename-is-not-a-supported-wheel-on-this","errorCode":null,"errorMessage":"{wheel.filename} is not a supported wheel on this platform.","messagePattern":"(.+?) is not a supported wheel on this platform\\.","errorType":"exception","errorClass":"InstallationError","httpStatus":null,"severity":"error","filePath":"src/pip/_internal/resolution/legacy/resolver.py","lineNumber":232,"sourceCode":"        \"\"\"\n        # If the markers do not match, ignore this requirement.\n        if not install_req.match_markers(extras_requested):\n            logger.info(\n                \"Ignoring %s: markers '%s' don't match your environment\",\n                install_req.name,\n                install_req.markers,\n            )\n            return [], None\n\n        # If the wheel is not supported, raise an error.\n        # Should check this after filtering out based on environment markers to\n        # allow specifying different wheels based on the environment/OS, in a\n        # single requirements file.\n        if install_req.link and install_req.link.is_wheel:\n            wheel = Wheel(install_req.link.filename)\n            tags = compatibility_tags.get_supported()\n            if requirement_set.check_supported_wheels and not wheel.supported(tags):\n                raise InstallationError(\n                    f\"{wheel.filename} is not a supported wheel on this platform.\"\n                )\n\n        # This next bit is really a sanity check.\n        assert (\n            not install_req.user_supplied or parent_req_name is None\n        ), \"a user supplied req shouldn't have a parent\"\n\n        # Unnamed requirements are scanned again and the requirement won't be\n        # added as a dependency until after scanning.\n        if not install_req.name:\n            requirement_set.add_unnamed_requirement(install_req)\n            return [install_req], None\n\n        try:\n            existing_req: InstallRequirement | None = requirement_set.get_requirement(\n                install_req.name\n            )","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/pypa/pip/blob/d7d0d0a39494e28ec1c407bd0680e4a4d1067791/src/pip/_internal/resolution/legacy/resolver.py#L214-L250","documentation":"InstallationError raised by the legacy resolver's _add_requirement_to_set when a direct wheel file (.whl) in the requirements is not compatible with the current platform's tags. pip builds a Wheel from the filename, computes compatibility_tags.get_supported() for the running interpreter/OS/arch, and if Wheel.supported(tags) is False (and check_supported_wheels is enabled) it refuses the wheel.","triggerScenarios":"'pip install ./foo-1.0-cp39-cp39-manylinux1_x86_64.whl' on, say, Python 3.10 / macOS / aarch64. The filename's tags (cp39, manylinux1, x86_64) do not intersect the supported tags, so supported() returns False.","commonSituations":"Downloading a wheel built for a different CPython ABI (cp39 vs cp310), a different OS (manylinux vs macosx), or a different architecture (x86_64 vs arm64); cross-platform lockfiles; CI matrix mismatch.","solutions":["Install a wheel matching your platform: check 'pip -V' and pick a wheel whose tags match (CPython version, OS, arch).","If only an sdist is available, let pip build from source: 'pip install foo==1.0' (no explicit wheel).","Upgrade Python to match the wheel's ABI, or rebuild the wheel on your platform ('pip wheel .').","If you knowingly need force, confirm the tags via 'pip debug --verbose' before retrying."],"exampleFix":"# before — on Python 3.10/macOS arm64\npip install ./foo-1.0-cp39-cp39-manylinux1_x86_64.whl\n\n# after\npip install foo==1.0   # let pip pick a compatible wheel or build from sdist","handlingStrategy":"validation","validationCode":"from pip._internal.models.wheel import Wheel\nfrom pip._internal.utils.compatibility_tags import get_supported\ndef wheel_supported_on_platform(filename: str) -> bool:\n    return Wheel(filename).supported(get_supported())","typeGuard":"def is_platform_compatible_wheel(filename: str) -> bool:\n    return wheel_supported_on_platform(filename)","tryCatchPattern":"if not wheel_supported_on_platform('foo-1.0-cp39-cp39-manylinux1_x86_64.whl'):\n    print('wheel incompatible; install from sdist or matching wheel')\nelse:\n    run_pip(['install', './foo-1.0-cp39-cp39-manylinux1_x86_64.whl'])","preventionTips":["Match wheel tags to your interpreter/OS/arch; inspect with 'pip debug --verbose'.","Prefer letting pip choose the wheel over pinning a specific .whl filename.","In cross-platform lockfiles, tag wheels per-platform and select at install time."],"tags":["wheel","platform","tags","compatibility","resolver"],"analyzedSha":"d7d0d0a39494e28ec1c407bd0680e4a4d1067791","analyzedAt":"2026-08-04T20:55:04.259Z","schemaVersion":2}