1 原因
使用 Qt 时报错,原因是缺少相应的库
具体报错信息:
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
2 解决
安装:libxcb-xinerama0
sudo apt install libxcb-xinerama0
运行Qt的问题解决了
网上还有其他的一些方式,遇到的情况不一样,解决的方式也不一样,仅供参考!
参考
PyQt5:解决qt.qpa.plugin: Could not load the Qt platform plugin "xcb"错误 https://www.jianshu.com/p/b51008566134