qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in
-
Help my please.
I have error and cat't it fixed two day.
I done two commandsexport QT_DEBUG_PLUGINS=1 qtcreator
and get code
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/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": 330752 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/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": 330752 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/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": 330752 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/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": 330752 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/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": 330752 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/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": 330752 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/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": 330752 } Got keys from plugin meta data ("xcb") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" qt.qpa.xcb: could not connect to display :1.0 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, xcb.
Where i have error?
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... ``` it's directorys has file
loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
-
@Nikolay_spb said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in:
qt.qpa.xcb: could not connect to display :1.0
Your xcb is fine. Your problem is it cannot connect to your X display, Describe your situation.
-
I use pycharm and did pip install pyqt5 and pip install pyqt5-contrib. On other pc all work but i have linux-mint and it's error
-
@Nikolay_spb
What is your$DISPLAY
environment variable set to? Are you running a VM or what/how for this Mint and how do you connect to it? -
i have three monitor benq and two hp.
i use env and install in it's
And I have a desktop computer -
@Nikolay_spb said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in:
i use env and install in it's
I do not know what this phrase means.
In any case your issue is
qt.qpa.xcb: could not connect to display :1.0
. Usually the main display is0:0
. That is all I know. Someone else will understand this X display issue better than I and hopefully comment. -
@Nikolay_spb Your PyQt installation has nothing to do with QtCreator, how did you install QtCreator?
-
very thanks
-
@eyllanesc sudo apt install qtcreator
-
@Nikolay_spb Are you using any special environment?
-
@eyllanesc no i use
python3 -m venv env
I use these libraries, maybe it will help
click==7.1.2 greenlet==1.1.1 numpy==1.21.2 opencv-contrib-python==3.4.15.55 opencv-python==4.3.0.36 opencv-python-headless==4.5.3.56 PyQt5==5.15.4 PyQt5-Qt5==5.15.2 PyQt5-sip==12.9.0 PyQt5-stubs==5.15.2.0 PySide2==5.15.2 python-dotenv==0.19.0 qtarmsim==0.5.5 shiboken2==5.15.2 shiboken6==6.1.3 SQLAlchemy==1.4.25 tabulate==0.8.9
-
@Nikolay_spb I think I have not let myself be understood: QtCreator is orthogonal to PyQt so please don't talk about pyqt anymore. My question is if you are using a VM, docker, etc.
-
@eyllanesc no i use desktop pc and os linux mint
-
@Nikolay_spb So it seems to me a bug in your OS, I recommend you report it. And so that you do not confuse them, do not mention anything about python that is irrelevant. In this forum little or nothing will be able to help you.
-
@Nikolay_spb Does your OS installation have a desktop manager?
-
@eyllanesc said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in:
Does your OS installation have a desktop manager?
yes, i have desktop manager -
@Nikolay_spb said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in:
yes, i have desktop manager
Would be nice to mention which one.
Is X server running or do you use something else (like Wayland)?