kitti_object_vis icon indicating copy to clipboard operation
kitti_object_vis copied to clipboard

how to deal the error : qt.qpa.plugin: Could not load the Qt platform plugin "xcb"

Open zsdfaker opened this issue 4 years ago • 10 comments

when i run kitti_object.py i get the error qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/zsder/anaconda3/envs/tensorflow/lib/python3.7/site-packages/cv2/qt/plugins" even though it was found. in debug log i get follow message:

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/home/zsder/anaconda3/envs/tensorflow/bin/platforms" ...
loaded library "/home/zsder/anaconda3/envs/tensorflow/lib/python3.7/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
QObject::moveToThread: Current thread (0x55c738b00180) is not the object's thread (0x55c738fe29f0).
Cannot move to target thread (0x55c738b00180)

my work space: ubuntu 20.04 python 3.7 opencv 4.4.0 pyqt 5.9.2 pyqt5 5.15.1

zsdfaker avatar Dec 02 '20 02:12 zsdfaker

@zsdfaker same error, did you find out anything?

arxidinakbar avatar Dec 10 '20 03:12 arxidinakbar

Maybe the plugin shipped with opencv was not suited for this version of QT. It may solve this to install opencv-python==3.4.10.35

Jieqianyu avatar Mar 24 '22 07:03 Jieqianyu

I have reinstalled mayavi according to the version in this link https://blog.csdn.net/qq_42266322/article/details/125387739

shijinghuihub avatar Jul 15 '22 09:07 shijinghuihub

I have reinstalled mayavi according to the version in this link https://blog.csdn.net/qq_42266322/article/details/125387739

And this: pip install opencv-python==4.1.2.30

shijinghuihub avatar Jul 15 '22 09:07 shijinghuihub

@shijinghuihub Thank you very much! You have solved my problem!

ansonlcy avatar Jul 26 '22 09:07 ansonlcy

@shijinghuihub sorry ,it didn't work for me

ZhongYupei avatar Aug 23 '22 09:08 ZhongYupei

thanks,it helps

I have reinstalled mayavi according to the version in this link https://blog.csdn.net/qq_42266322/article/details/125387739

Liuyaqi99 avatar Oct 20 '22 06:10 Liuyaqi99

Just do "pip install opencv-python==4.1.2.30" without going to that link, this works for me.

PercyJia95 avatar Jan 02 '23 11:01 PercyJia95

That is the fix. Why not update the readme?

zenjieli avatar Mar 09 '23 20:03 zenjieli

I have reinstalled mayavi according to the version in this link https://blog.csdn.net/qq_42266322/article/details/125387739

按照这个版本重新安装环境,可以用

gxmc0ming avatar Mar 23 '23 06:03 gxmc0ming