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

2024-09-26 22:13:47 发布

您现在位置:Python中文网/ 问答频道 /正文

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

pip冻结输出:

  • 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
  • shiboken2==5.15.2
  • shiboken6==6.0.3

python plotting.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)

Tags: pipthe环境applicationqtpluginpyqt5platform
1条回答
网友
1楼 · 发布于 2024-09-26 22:13:47

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

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

  • sudo apt get安装-y libxkbcommon-x11-0 x11 utils
  • sudo apt get install无安装建议-y libyaml dev libegl1 mesa libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0

相关问题 更多 >

    热门问题