macOS duplicate SDL warnings with opencv-python 4.13.0.92 and pygame
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1k
- Avg merge
- 22h 17m
- Merged PRs (30d)
- 3
Description
Hi,
I updated opencv-python from 4.12.0.88 to 4.13.0.92, and now I’m seeing duplicate SDL class warnings when opencv-python and pygame are imported in the same process.
For example:
import pygame
import cv2
gives warnings like:
Class SDLApplication is implemented in both .../site-packages/pygame/.dylibs/libSDL2-2.0.0.dylib and .../site-packages/cv2/.dylibs/libSDL2-2.0.0.dylib. This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
Do you have any advice on how this should be handled? Thanks!
Environment:
macOS Sequoia (Apple M1)
Python 3.12.11
opencv-python 4.13.0.92
pygame 2.6.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the import order on macOS with the listed Python, opencv-python, and pygame versions, then inspect the bundled cv2/.dylibs/libSDL2-2.0.0.dylib and pygame/.dylibs/libSDL2-2.0.0.dylib files. Done means identifying whether the duplicate warning can be avoided through packaging or documented usage, with the result verified against the reported imports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, opencv, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100