roboflow/supervision · error · ValueError

OpenCV runtime requirement remains in {wheel}: {requirements

Error message

OpenCV runtime requirement remains in {wheel}: {requirements}

What it means

Error "OpenCV runtime requirement remains in {wheel}: {requirements}" thrown in roboflow/supervision.

Source

Thrown at .github/scripts/verify_clean_wheel.py:42

    """Read the core metadata embedded in a wheel archive."""
    with zipfile.ZipFile(wheel) as archive:
        metadata_paths = [
            name for name in archive.namelist() if name.endswith("/METADATA")
        ]
        if len(metadata_paths) != 1:
            raise ValueError(
                f"expected one METADATA file in {wheel}, found {metadata_paths}"
            )
        return message_from_bytes(archive.read(metadata_paths[0]))


def _validate_metadata(wheel: Path) -> None:
    """Reject wheels that retain an OpenCV runtime requirement or extra."""
    metadata = _wheel_metadata(wheel)
    requirements = metadata.get_all("Requires-Dist", [])
    extras = metadata.get_all("Provides-Extra", [])
    if any("opencv" in requirement.lower() for requirement in requirements):
        raise ValueError(
            f"OpenCV runtime requirement remains in {wheel}: {requirements}"
        )
    if any("opencv" in extra.lower() for extra in extras):
        raise ValueError(f"OpenCV extra remains in {wheel}: {extras}")


def _validate_manifest(manifest: Path) -> None:
    """Keep the installed-wheel fallback smoke contract explicit and complete."""
    checks = {
        s
        for line in manifest.read_text(encoding="utf-8").splitlines()
        if (s := line.strip()) and not s.startswith("#")
    }
    if checks != _MANIFEST_CHECKS:
        raise ValueError(
            f"unexpected fallback manifest {checks}; expected {_MANIFEST_CHECKS}"
        )

View on GitHub (pinned to 7f254d9784)

Solutions

  1. Remove the OpenCV runtime dependency from the wheel's requirements before publishing; the fallback build must not depend on opencv.
  2. Check pyproject.toml / build config so the opencv dependency is excluded from the clean wheel target.

When it happens

Trigger: Thrown at .github/scripts/verify_clean_wheel.py:42 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of roboflow/supervision@7f254d9784 (2026-08-15). Data as JSON: /api/errors/8c71cf7dd707a26d. Report an issue: GitHub.