0

我目前正在尝试在 KDE Neon 上的 Wayland 会话中运行编写为使用 PyQt5 的程序,但是当我尝试启动它时遇到此错误:

This application failed to start because it could not find or load the Qt platform plugin "wayland"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.

有人建议我确保 qtwayland5 已经安装在我的系统上,情况就是这样,所以这似乎不是问题的根源。

此外,我已经确认使用我的发行版存储库中的 PyQt5 版本以及安装在 virtualenv 中的最新版本的 PyQt5 仍然存在此问题。

4

1 回答 1

0

如果您不介意在 xcb 而不是 Wayland 上运行,您可以随时取消设置QT_QPA_PLATFORM=wayland(使用 KDE wayland 登录时设置),您的应用程序将在 XWayland 下运行。

于 2018-04-03T07:30:16.023 回答