I was worried quite a bit, so a memorandum
Mac OS 10.15.3 Python 3.7.3 (by homebrew) opencv-contrib-python 4.2.0.32 (by pip) opencv-python 4.2.0.32 (by pip)
If you put python-opencv
and try the code of the gift,
I get the following error.
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
When I looked it up, many people asked me to set the environment variable QT_QPA_PLATFORM_PLUGIN_PATH
, but it didn't work in my own environment.
After all, it was solved when I downgraded to opencv-python 4.1 series.
pip3 install opencv-python==4.1.2.30
pip3 install opencv-contrib-python==4.1.2.30
https://stackoverflow.com/questions/60032540/opencv-cv2-imshow-is-not-working-because-of-the-qt
Recommended Posts