Error:
Using Theano backend.
QObject::moveToThread: Current thread (0x5586ca2ace60) is not the object's thread (0x5586ca32e830).
Cannot move to target thread (0x5586ca2ace60)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/shikha/anaconda3/envs/sultani_again/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
Solution : If your python program "test.py"needs PyQt5 to run and we can insatll PyQt5 with "pip install PyQt5" and the above mentioned error can be removed as below:
1. set QT_QPA_PLATFORM=offscreen
or
2. QT_QPA_PLATFORM=offscreen python test.py