You are not logged in.
I have PyQt5 installed and I am running an application using it. I am using a virtualenv and everything was installed with pip.
When I try to launch it I receive the following error:
WARNING: Could not load the Qt platform plugin "xcb" in "" even though it was found.
WARNING: 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)
Trying to debug it with export QT_DEBUG_PLUGINS=1, I get:
WARNING: QFactoryLoader::QFactoryLoader() checking directory path "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms" ...
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqeglfs.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("eglfs")
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqlinuxfb.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("linuxfb")
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqminimal.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("minimal")
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqminimalegl.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("minimalegl")
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqoffscreen.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("offscreen")
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqvnc.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("vnc")
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-egl.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("wayland-egl")
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-generic.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("wayland")
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-xcomposite-egl.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("wayland-xcomposite-egl")
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-xcomposite-glx.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("wayland-xcomposite-glx")
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqwebgl.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("webgl")
WARNING: QFactoryLoader::QFactoryLoader() looking at "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so"
WARNING: Found metadata in lib /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/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
}
WARNING: Got keys from plugin meta data ("xcb")
WARNING: QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
WARNING: Cannot load library /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/lib/libQt5XcbQpa.so.5: symbol _ZTI23QPlatformVulkanInstance version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
WARNING: QLibraryPrivate::loadPlugin failed on "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/lib/libQt5XcbQpa.so.5: symbol _ZTI23QPlatformVulkanInstance version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
WARNING: Could not load the Qt platform plugin "xcb" in "" even though it was found.
WARNING: 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)
Offline
WARNING: QLibraryPrivate::loadPlugin failed on "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" :
"Cannot load library /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/lib/libQt5XcbQpa.so.5:
symbol _ZTI23QPlatformVulkanInstance version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
WARNING: Could not load the Qt platform plugin "xcb" in "" even though it was found.
The qt5_private_api part suggests the application expects an older QT5 version , see https://wiki.archlinux.org/index.php/Qt … Qt5_update
Often this can by solved by setting QT_QPA_PLATFORMTHEME explicitly.
Last edited by Lone_Wolf (2019-06-12 10:32:06)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
WARNING: QLibraryPrivate::loadPlugin failed on "/home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /home/juanma/Projects/ChemCAD/ChemCAD/venv/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/lib/libQt5XcbQpa.so.5: symbol _ZTI23QPlatformVulkanInstance version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)" WARNING: Could not load the Qt platform plugin "xcb" in "" even though it was found.
The qt5_private_api part suggests the application expects an older QT5 version , see https://wiki.archlinux.org/index.php/Qt … Qt5_update
Often this can by solved by setting QT_QPA_PLATFORMTHEME explicitly.
Thanks for your answer. I installed all the libraries using a requirements.txt file in the git repo. I installed them all using pip and virtualenv.
In the case of PyQt5 it says it needs PyQt5==5.9.2, which I did install, but it produced the same error. Otherwise using the last PyQt5 in pip (5.12) also produces the same error.
How can I check QT_QPA_PLATFORMTHEME explicitly? I have checked your link to the arch wiki, but I am a bit lost.
Offline
It may be that your python virtenv doesn't use the value for QT_QPA_PLATFORMTHEME that's set in your normal environment
run
$ echo $QT_QPA_PLATFORMTHEME
to see what it is set to, then adjust the virtenv to set QT_QPA_PLATFORMTHEME to the same value.
Test if that solves the issue.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
It may be that your python virtenv doesn't use the value for QT_QPA_PLATFORMTHEME that's set in your normal environment
run
$ echo $QT_QPA_PLATFORMTHEME
to see what it is set to, then adjust the virtenv to set QT_QPA_PLATFORMTHEME to the same value.
Test if that solves the issue.
Both in my virtualenv or my normal environment, this outputs nothing
Offline
That suggests your WM/DE are not Qt-based. What are you using ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
That suggests your WM/DE are not Qt-based. What are you using ?
I finally fixed the problem by telling virtualenv to use my system packages when possible. It seems there was some mistake between the pip pyqt5 and my WM/DE qt5 installation.
Offline