pypa/pip · error · InvalidWheelFilename

{e.args[0]}

Error message

{e.args[0]}

What it means

Error "{e.args[0]}" thrown in pypa/pip.

Source

Thrown at src/pip/_internal/models/wheel.py:27

from pip._vendor.packaging.tags import Tag
from pip._vendor.packaging.utils import (
    InvalidWheelFilename as _PackagingInvalidWheelFilename,
)
from pip._vendor.packaging.utils import parse_wheel_filename

from pip._internal.exceptions import InvalidWheelFilename


class Wheel:
    """A wheel file"""

    def __init__(self, filename: str) -> None:
        self.filename = filename

        try:
            wheel_info = parse_wheel_filename(filename)
        except _PackagingInvalidWheelFilename as e:
            raise InvalidWheelFilename(e.args[0]) from None

        self.name, _version, self.build_tag, self.file_tags = wheel_info
        self.version = str(_version)

    def get_formatted_file_tags(self) -> list[str]:
        """Return the wheel's tags as a sorted list of strings."""
        return sorted(str(tag) for tag in self.file_tags)

    def support_index_min(self, tags: list[Tag]) -> int:
        """Return the lowest index that one of the wheel's file_tag combinations
        achieves in the given list of supported tags.

        For example, if there are 8 supported tags and one of the file tags
        is first in the list, then return 0.

        :param tags: the PEP 425 tags to check the wheel against, in order
            with most preferred first.

View on GitHub (pinned to d7d0d0a394)

When it happens

Trigger: Thrown at src/pip/_internal/models/wheel.py:27 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of pypa/pip@d7d0d0a394 (2026-08-04). Data as JSON: /data/errors/bdf7c08bf144d998.json. Report an issue: GitHub.