Skip to content

fix: opencv dependency conflict #8095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 10, 2025
Merged

Conversation

psychedelicious
Copy link
Collaborator

Summary

build: prevent opencv-python from being installed

Fixes this error: AttributeError: module 'cv2.ximgproc' has no attribute 'thinning'

opencv-contrib-python supersedes opencv-python, providing the same API + additional features. The two packages should not be installed at the same time to avoid conflicts and/or errors.

The invisible-watermark package requires opencv-python, but we require the contrib variant.

This change updates pyproject.toml to prevent opencv-python from ever being installed using a uv features called dependency overrides.


Also update app dependency list endpoint to return all dependencies. This indirectly fixes an issue where that endpoint would raise when attempting to get the version for something that is not installed (e.g. opencv-python). Could have just changed it to show opencv-contrib-python instead, but why not just show all deps. Better for troubleshooting.

Related Issues / Discussions

Mentioned several times on discord but I didn't understand the issue until this thread w/ @joshistoast: https://discord.com/channels/1020123559063990373/1378131748856135811/1378131748856135811

QA Instructions

uv pip install -e . should fix it for manual installs and after updating via launcher to the next release version, should also be fixed.

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

Fixes this error: `AttributeError: module 'cv2.ximgproc' has no attribute 'thinning'`

`opencv-contrib-python` supersedes `opencv-python`, providing the same API + additional features. The two packages should not be installed at the same time to avoid conflicts and/or errors.

The `invisible-watermark` package requires `opencv-python`, but we require the contrib variant.

This change updates `pyproject.toml` to prevent `opencv-python` from ever being installed using a `uv` features called dependency overrides.
@github-actions github-actions bot added api python PRs that change python files Root frontend PRs that change frontend files python-deps PRs that change python dependencies labels Jun 10, 2025
@maryhipp maryhipp merged commit d7b5a8b into main Jun 10, 2025
12 checks passed
@maryhipp maryhipp deleted the psyche/fix/opencv-dep-conflict branch June 10, 2025 12:33
maryhipp pushed a commit that referenced this pull request Jun 10, 2025
* build: prevent `opencv-python` from being installed

Fixes this error: `AttributeError: module 'cv2.ximgproc' has no attribute 'thinning'`

`opencv-contrib-python` supersedes `opencv-python`, providing the same API + additional features. The two packages should not be installed at the same time to avoid conflicts and/or errors.

The `invisible-watermark` package requires `opencv-python`, but we require the contrib variant.

This change updates `pyproject.toml` to prevent `opencv-python` from ever being installed using a `uv` features called dependency overrides.

* feat(ui): data viewer supports disabling wrap

* feat(api): list _all_ pkgs in app deps endpoint

* chore(ui): typegen

* feat(ui): update about modal to display new full deps list

* chore: uv lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api frontend PRs that change frontend files python PRs that change python files python-deps PRs that change python dependencies Root
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants