Skip to content

fix opencv-python handling to avoid conflict - #461

Open
Maslino wants to merge 1 commit into
WASasquatch:mainfrom
Maslino:main
Open

fix opencv-python handling to avoid conflict#461
Maslino wants to merge 1 commit into
WASasquatch:mainfrom
Maslino:main

Conversation

@Maslino

@Maslino Maslino commented Aug 15, 2024

Copy link
Copy Markdown

There are four opencv python packages:

  • opencv-python
  • opencv-contrib-python
  • opencv-python-headless
  • opencv-contrib-python-headless

Only one of them should be installed otherwise there would have conflict.

The code line

if 'opencv-python' in packages() or 'opencv-python-headless' in packages():

only consider opencv-python and opencv-python-headless and the other two are not considered. The above line is also not neccessary because if opencv package was not installed, an ImportError exception would be thrown.

This PR tries to fix this problem.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant