{"record":{"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/f399c3718970b1b0e2478dac5296eb62679a9b86/src/pip/_internal/resolution/legacy/resolver.py#L214-L250","documentation":"In the legacy resolver, when a requirement link points to a wheel, pip builds a Wheel from the filename and checks wheel.supported(get_supported_tags()) (resolver.py:231-234). If the wheel's tags don't intersect the platform's supported tags, it raises InstallationError — the wheel was built for a different OS/arch/ABI/Python.","triggerScenarios":"Installing a wheel whose filename tags (platform/abi/python) don't match the current environment, e.g. cp36-win_amd64 on Linux, or cp311 on cp310.","commonSituations":"Downloading the wrong wheel from PyPI manually; --platform/--abi/--python-version flags mismatched; ABI-tag mismatch (cp3x vs abi3).","solutions":["Let pip select the right wheel automatically (pip install <pkg> without an explicit .whl).","Install from sdist so pip builds a compatible wheel locally.","When targeting another platform, set --platform, --abi, and --python-version consistently."],"exampleFix":"# before\npip install pkg-1.0-cp36-win_amd64.whl   # on Linux\n# after\npip install pkg==1.0   # pip picks a Linux wheel or builds from sdist","handlingStrategy":"validation","validationCode":"# Before installing a local wheel, verify its tags are supported here.\nfrom pip._internal.utils.compatibility_tags import get_supported\nfrom pip._internal.utils.wheel import Wheel\nimport sys\nwhl = sys.argv[1]\nw = Wheel(whl)\nif not w.supported(get_supported()):\n    print(f\"{whl} is NOT supported on this platform; pick another or build from sdist\")\nelse:\n    print(\"OK\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Let pip auto-select the wheel instead of pinning a specific .whl filename.","When cross-targeting, set --platform, --abi, --python-version together.","Prefer sdist builds when no compatible wheel exists."],"tags":["wheel","platform","compatibility"],"backgroundTag":null,"analyzedSha":"f399c3718970b1b0e2478dac5296eb62679a9b86","analyzedAt":"2026-08-08T23:01:42.227Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}