qt.qpa.plugin: Could not load the Qt platform plugin "xcb"
Opened this issue · 7 comments
Hi,
After downloading blackmamba, and installing all modules in packages.txt, I get this error when running main.py
QObject::moveToThread: Current thread (0x564a6f347060) is not the object's thread (0x564a6fb51910).
Cannot move to target thread (0x564a6f347060)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/root/Downloads/blackmamba/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.
Aborted
By the way, I couldn't install the WMI module in the packages.txt file on my linux laptop, due to this error:
ERROR: Could not find a version that satisfies the requirement pywin32 (from wmi)
I think it's because it's not a windows machine, that's why it can't find pywin32 from pip repo.
Hi, jJit0!
Can you send me please:
- Your OS name
- The version of PyQt5 (pip3 show PyQt5)
Hey,
- Kali Linux 2020.4
- PyQt5 5.15.2
I forgot to tell you that I virtualenved blackmamba, and installed all modules in packages.txt
Hi,
1 - About the wmi error: yes, this error is because your OS is not Windows;
2 - About the Qt platform plugin "xcb" error: please, try to uninstall the opencv-python PIP package and try to start the main.py again.
Hi,
It worked great without the opencv-python, thanks ;)
You should create two requirements.txt files, one for Windows with the WMI module, and one for Linux without the WMI module.
The cv2 (opencv-python) generate a conflict of call with ibxcb-util.so.1 plugin, and it generates this error. I did acidentally inputed this PIP package in the needed PIP packages of server, but is only necessary for run the client script in the target host. The WMI too is only necessary for the target host. Btw I'll fix it.