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.
导入最新的opencv-python运行一个小demo时,突然报错,导致摄像头无法打开。解决放法其实很简单:
pip3 install opencv-python-headless
或者
pip install opencv-python-headless
这里可能是新版的opencv默认没有把opencv-python-headless一起导入,需要在使用的时候用户自己选择导入。
获取更多内容,请访问博主的个人博客 爱吃猫的小鱼干的Blog