Cannot move to target thread (0x8c9a160)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/zml/anaconda3/envs/tf/lib/python3.8/site-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.
Available platform plugins are: xcb, eglfs, minimal, minimalegl, offscreen, vnc, webgl.
这是同类报错的一种思路,提供给你做参考
解决方案:
openCV降级
卸载pip uninstall opencv-python
安装pip install opencv-python==4.1.2.30
修改配置文件~/.bashrc,在终端中输入以下命令:
vim ~/.bashrc
在文件最末尾添加如下语句:
export QT_DEBUG_PLUGINS=1
保存,退出文件,执行
source ~/.bashrc
使配置生效
详见:
https://www.jb51.net/article/193024.htm