YeongJunKim / issue

footprint of fixed error & some tips.
0 stars 0 forks source link

xcb error with anaconda #32

Open YeongJunKim opened 1 year ago

YeongJunKim commented 1 year ago

error:

Namespace(directory='sample/', file=None, saveDirectory='sample/result')
QObject::moveToThread: Current thread (0x919390) is not the object's thread (0xec9330).
Cannot move to target thread (0x919390)

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

solution:

pip install opencv-python-headless
YeongJunKim commented 1 year ago

fix1 도 효과가 있음!

fix 1: use os.environ.pop("QT_QPA_PLATFORM_PLUGIN_PATH") in code fix 2: try pip install opencv-python-headless (without GUI) fix 3: delete the libqxcb from "/home/usernamexyz/.local/lib/python3.9/site-packages/cv2/qt/plugins/platforms