gpt4 book ai didi

python - 如何修复 Ubuntu 21.10 中的 QT 问题?

转载 作者:行者123 更新时间:2023-12-04 19:05:43 28 4
gpt4 key购买 nike

几天前我将我的 Ubuntu 机器更新到了最新版本 21.10。
现在,我在运行运行良好的 Python 软件时遇到了几个错误。甚至 Ananconda Navigator(也已更新)也无法正常工作。
Qt 版本识别看起来有问题,但我不知道如何将其降级为工作版本。
错误信息是:

2021-11-24 11:03:24,496 - WARNING linux_scaling.get_scaling_factor_using_dbus:39
Can't detect system scaling factor settings for primary monitor.

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
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)
使用导出 QT_DEBUG_PLUGINS=1我有:
2021-11-24 11:09:24,211 - WARNING linux_scaling.get_scaling_factor_using_dbus:39
Can't detect system scaling factor settings for primary monitor.

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QFactoryLoader::QFactoryLoader() checking directory path "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqeglfs.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqeglfs.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"eglfs"
]
},
"archreq": 0,
"className": "QEglFSIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqlinuxfb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"linuxfb"
]
},
"archreq": 0,
"className": "QLinuxFbIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqminimal.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqminimal.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimal"
]
},
"archreq": 0,
"className": "QMinimalIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqminimalegl.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqminimalegl.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimalegl"
]
},
"archreq": 0,
"className": "QMinimalEglIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqoffscreen.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqoffscreen.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"offscreen"
]
},
"archreq": 0,
"className": "QOffscreenIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqvnc.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqvnc.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"vnc"
]
},
"archreq": 0,
"className": "QVncIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-egl.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-egl.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"wayland-egl"
]
},
"archreq": 0,
"className": "QWaylandEglPlatformIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("wayland-egl")
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-generic.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-generic.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"wayland"
]
},
"archreq": 0,
"className": "QWaylandIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("wayland")
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-xcomposite-egl.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"wayland-xcomposite-egl"
]
},
"archreq": 0,
"className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("wayland-xcomposite-egl")
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-xcomposite-glx.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"wayland-xcomposite-glx"
]
},
"archreq": 0,
"className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("wayland-xcomposite-glx")
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwebgl.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwebgl.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"webgl"
]
},
"archreq": 0,
"className": "QWebGLIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("webgl")
QFactoryLoader::QFactoryLoader() looking at "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so"
Found metadata in lib /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"archreq": 0,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 330752
}


Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/home/icamps/anaconda3/bin/platforms" ...
Cannot load library /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5: undefined symbol: _ZTI23QPlatformVulkanInstance, version Qt_5_PRIVATE_API)
QLibraryPrivate::loadPlugin failed on "/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/home/icamps/anaconda3/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5: undefined symbol: _ZTI23QPlatformVulkanInstance, version Qt_5_PRIVATE_API)"
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.
我很感激任何帮助。

最佳答案

如果您的程序不支持 Wayland 并且您的环境是 x11 之前的版本,则设置 GDK_BACKEND=x11在运行程序之前可能会有所帮助(暂时)。

export GDK_BACKEND=x11

关于python - 如何修复 Ubuntu 21.10 中的 QT 问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70185365/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com