Skip to content

Upgrading to the headless OpenCV leaves the GUI build installed #579

Description

@chinmayajha

#577 switches the dependency from opencv-python to opencv-python-headless. That fixes fresh installs on minimal Linux images. It does nothing for anyone upgrading.

pip does not uninstall opencv-python just because the new metadata asks for a different distribution. Both ship the same cv2 module, so an upgraded environment ends up with two distributions providing one import name, and which one wins depends on install order.

Observed while testing #577: force-reinstalling the new wheel over an environment that already had opencv-python left the GUI build in place, and optics --version kept failing on libxcb.so.1 exactly as before the fix.

Options

  • Note it in the release notes with the one-line fix:
    pip uninstall -y opencv-python && pip install --force-reinstall optics-framework
  • Have optics doctor report it: both distributions resolvable via importlib.metadata is unambiguous and cheap to detect, and doctor is where a user already goes when the CLI misbehaves.

The doctor row seems the better of the two — release notes are read once, and this failure surfaces later as a mysterious import error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions