程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

该应用程序不在 PyQt5 上运行

发布于2022-11-13 16:39     阅读(1083)     评论(0)     点赞(18)     收藏(5)


我尝试启动应用程序,但没有任何结果。终端输出:

qt.qpa.xcb: could not connect to display 
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

我还使用环境变量运行了我的应用程序,QT_DEBUG_PLUGINS=1以查看加载插件时可能出现的问题。终端输出:

QFactoryLoader::QFactoryLoader() checking directory path "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so"
Found metadata in lib /home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so"
Found metadata in lib /home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so"
Found metadata in lib /home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so"
Found metadata in lib /home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so"
Found metadata in lib /home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-egl.so"
Found metadata in lib /home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/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": 331520
}


Got keys from plugin meta data ("wayland-egl")
QFactoryLoader::QFactoryLoader() looking at "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-generic.so"
Found metadata in lib /home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/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": 331520
}


Got keys from plugin meta data ("wayland")
QFactoryLoader::QFactoryLoader() looking at "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-egl.so"
Found metadata in lib /home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/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": 331520
}


Got keys from plugin meta data ("wayland-xcomposite-egl")
QFactoryLoader::QFactoryLoader() looking at "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqwayland-xcomposite-glx.so"
Found metadata in lib /home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/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": 331520
}


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


Got keys from plugin meta data ("webgl")
QFactoryLoader::QFactoryLoader() looking at "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
Found metadata in lib /home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/home/em0ji/.cache/pypoetry/virtualenvs/loki_browser-Lx0dDKdt-py3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display
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

我一直在寻找答案,但找不到正确解决我的问题的答案。帮助解决问题。


解决方案


暂无回答



所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接:https://www.pythonheidong.com/blog/article/1847150/7fe9468c614bcd658e2e/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

18 0
收藏该文
已收藏

评论内容:(最多支持255个字符)