-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" -- fixed #842
Comments
I'm faced with the same , ... so called bugs? It was some thing relative to qt in Linux, may be you should submit the bug to opencv.
|
I have the same problem for a week, you mean 'remove /usr/lib/python3.7/site-packages/cv2/qt/plugins'. How to remove? remove the whole plugins directory or all files under this directory |
or remove the qt directory? |
@TaucherLoong Delete the whole plugins directory from wherever your venv is located. In my Project using the Pycharm IDE this would be venv/lib/python3.9/site-packages/cv2/qt/plugins |
@YacobBY Thanks a lot,it really works |
Thanks for finding and sharing the solution. 👍 |
In my case |
Dialing in here - removing the whole plugins folder breaks opencv if you're using it in normal (not headless) mode. I feel like this bug needs a better solution. |
In case you're running on a server: Check if there are any calls for graphical output like |
What if I want the graphical output? Is there no way to have it work with the windows? It will be really hard to know if the app is working without being able to see anything for testing |
Thanks @TaucherLoong , |
It really works!!! |
the solution works for me but when i use the normal opencv imshow function it shows this error Aborted (core dumped) |
L solved it by the blow command:
|
I solved this by installing a lower version of pyqt5 pip uninstall pyqt5 |
Thanks for the solution, it worked for me! |
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/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.
//////////////////////or//////////////////////////////////
QObject::moveToThread: Current thread (0xe38c70) is not the object's thread (0x1ab6aa0).
Cannot move to target thread (0xe38c70)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/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.
///////////////////trace bug method
ldd /usr/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so
search [not found]
/////////////////// solved//////////////
sudo apt-get install python3-pyqt5
sudo apt-get install libxcb-xinerama0
sudo pip3 install pyqt5
sudo pip3 install opencv-python==3.4.10.35
sudo pip3 install labelme
The text was updated successfully, but these errors were encountered: