由于qt,OpenCV cv2.imshow无法正常工作 [英] OpenCV cv2.imshow is not working because of the qt
问题描述
由于以下错误消息,我无法使用cv2.imshow()
.
I am having a problem that I can not use cv2.imshow()
because of following error message
qt.qpa.plugin:在"中找不到Qt平台插件"cocoa"
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
此应用程序无法启动,因为无法初始化Qt平台插件.重新安装该应用程序可能会解决此问题.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
我最初使用的最后一个Macbook没有QT,所以我不知道该如何处理.
Last Macbook I was using initially did not have QT so I have no idea how should I deal with it.
有什么想法吗?
推荐答案
更新opencv - python to 4.2.0.32
后,我遇到了同样的问题.
I had the same issue after updating opencv - python to 4.2.0.32
.
卸载opencv-python
并安装较低版本(例如pip install opencv-python==4.1.0.25
)可以解决此问题.
Uninstall opencv-python
and install the lower version (e.g pip install opencv-python==4.1.0.25
) solves this issue.
这篇关于由于qt,OpenCV cv2.imshow无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!