在Ubuntu(WSL)上编译PySide2应用时,Qt版本不匹配错误,在openSUSE上工作正常

时间:2019-08-20 10:17:58

标签: python pyinstaller pyside2

我正在处理的项目遇到一个奇怪的问题:它是用Python 3编写的,并使用PySide2和PyInstaller进行捆绑。

当我从openSUSE(WSL)进行编译时,生成的二进制文件可以完美地在同一openSUSE上运行,也可以在Ubuntu(WSL)上完美运行。

但是当我从Ubuntu(WSL)编译它时,它无法在任何地方运行,并且在Ubuntu上出现此错误:

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)

和openSUSE上的这个

libQt5Core.so.5: version `Qt_5.13' not found (required by /path/to/project)

随机地,我有时会在两个地方都出现此错误:

{{1}}

我觉得很奇怪,在Ubuntu上,编译版本甚至无法在与编译版本相同的OS上运行,而经过openSUSE编译的版本随处可见。

0 个答案:

没有答案