出现“qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ‘ ’even though it was found

出现该问题:
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “/usr/local/lib/python3.6/dist-packages/cv2/qt/plugins” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem

在这里插入图片描述

网上找了很多解决方法,好多都不适用
最后在评论中发现一句可能是因为ssh连接的问题,终端找不到屏幕
我也是ssh远程连接的服务器
然后把代码中的imshow改为imwrite,保存到路径下再查看

…………

结果就好了…

出现“qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ‘ ’even though it was found_第1张图片

你可能感兴趣的:(qt,开发语言)