DL-Practise/YoloAll

python main_widget.py qt.qpa.plugin Qt platform plugin "xcb"

Jerry-muyangren opened this issue · 1 comments

我的是Ubuntu16.04系统,已安装pip install -r requirements.txt

运行python main_widget.py时,出现报错如下:`$ python main_widget.py
QObject::moveToThread: Current thread (0x564cc7b698e0) is not the object's thread (0x564cc7aba3c0).
Cannot move to target thread (0x564cc7b698e0)

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/media/wl/work/anaconda3/envs/yoloall/lib/python3.7/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, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.

Aborted (core dumped)`

问题怎么解决呢?谢谢

这个应该是pyqt5环境的问题。建议你编写一个简单的pyqt5程序试试看,应该也还是会报这个错误。如果是这个错误,原因有很多,建议你网上搜索看看。