pyqtgraph 运行时错误:无法加载插件"xcb"



我的Python环境:Ubuntun 20.10,Python 3.8.6,

点数冻结输出:

  • PyQt5==5.15.4
  • PyQt5-Qt5==5.15.2
  • PyQt5 sip=12.8.1
  • pyqtgraph==0.12.1
  • PySide2==5.15.2
  • PySide6==6.0.3
  • 石伯坑2==5.15.2
  • 石伯坑6==6.0.3

python绘图.py

错误消息:

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.
Aborted (core dumped)

我在这个链接中找到了解决方案(https://github.com/pyqtgraph/pyqtgraph/issues/1220)。

在以下安装之后,PyQtGraph示例代码开始工作:

  • sudo apt-get-install-y libxkbcommon-x11-0 x11实用程序
  • sudo apt-get-install-不建议安装-y libyaml-devlibegl1台面libxcb-icccm4 libxcb-image0 libxcb-keysyms1libxcb-randr0 libxcb-render-util0 libxcb-xinerama0

最新更新