Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Forum Updated to NodeBB v4.3 + New Features

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
9 Posts 4 Posters 10.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shivak3
    wrote on last edited by
    #1

    Hi All,

    My system details are:

    Operating System: Red Hat Enterprise Linux Server 7.9 (Maipo)
    Kernel: Linux 3.10.0-1160.15.2.el7.x86_64
    Architecture: x86-64

    I see this error when I run mayavi Data Visualizer application after installing PyQT5 5.15.2 version using the pip command like...

    [root@RHEL7 ~] pip install PyQt5==5.15.2
    

    When I run mayavi application

    [root@RHEL7 ~]$ mayavi2
    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, minimal, minimalegl, offscreen, vnc, xcb.
    
    Aborted (core dumped)
    [root@RHEL7 ~]
    

    I had the mayavi setup under conda environment with PyQt5=5.12.3 version and had no issues with mayavi application.

    (base) [root@RHEL7 ~]$ conda list | grep pyqt
    pyqt                      5.9.2            py37h05f1152_2  
    pyqt5                     5.12.3                   pypi_0    pypi
    pyqt5-sip                 12.7.1                   pypi_0    pypi
    pyqtwebengine             5.12.1                   pypi_0    pypi
    
    

    My system environment variables for QT are

    [root@RHEL7 ~]$ env | grep QT
    QTDIR=/usr/lib64/qt4
    QTINC=/usr/lib64/qt4/include
    QT_GRAPHICSSYSTEM_CHECKED=1
    QT_IM_MODULE=ibus
    QTLIB=/usr/lib64/qt4/lib
    QT_PLUGIN_PATH=/usr/lib64/kde4/plugins:/usr/lib/kde4/plugins
    [root@RHEL7 ~]
    

    Could anyone please help me with this issue. Thank you in advance.

    JonBJ 1 Reply Last reply
    0
    • S shivak3

      Hi All,

      My system details are:

      Operating System: Red Hat Enterprise Linux Server 7.9 (Maipo)
      Kernel: Linux 3.10.0-1160.15.2.el7.x86_64
      Architecture: x86-64

      I see this error when I run mayavi Data Visualizer application after installing PyQT5 5.15.2 version using the pip command like...

      [root@RHEL7 ~] pip install PyQt5==5.15.2
      

      When I run mayavi application

      [root@RHEL7 ~]$ mayavi2
      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, minimal, minimalegl, offscreen, vnc, xcb.
      
      Aborted (core dumped)
      [root@RHEL7 ~]
      

      I had the mayavi setup under conda environment with PyQt5=5.12.3 version and had no issues with mayavi application.

      (base) [root@RHEL7 ~]$ conda list | grep pyqt
      pyqt                      5.9.2            py37h05f1152_2  
      pyqt5                     5.12.3                   pypi_0    pypi
      pyqt5-sip                 12.7.1                   pypi_0    pypi
      pyqtwebengine             5.12.1                   pypi_0    pypi
      
      

      My system environment variables for QT are

      [root@RHEL7 ~]$ env | grep QT
      QTDIR=/usr/lib64/qt4
      QTINC=/usr/lib64/qt4/include
      QT_GRAPHICSSYSTEM_CHECKED=1
      QT_IM_MODULE=ibus
      QTLIB=/usr/lib64/qt4/lib
      QT_PLUGIN_PATH=/usr/lib64/kde4/plugins:/usr/lib/kde4/plugins
      [root@RHEL7 ~]
      

      Could anyone please help me with this issue. Thank you in advance.

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2

      @shivak3
      Hello and welcome.

      export QT_DEBUG_PLUGINS=1, and then run your Python program. Look near the end of the diagnostic output for the cause.

      There are also an awful lot of topics with this title on this forum you could search for. You may need to install some OS packages. One of them will be your case.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        shivak3
        wrote on last edited by
        #3

        @JonB .

        Thank you for your reply. I will check it .

        1 Reply Last reply
        0
        • S Offline
          S Offline
          shivak3
          wrote on last edited by
          #4

          Hi,

          After running export QT_DEBUG_PLUGINS=1, the results are...

          QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib64/kde4/plugins/platforms" ...
          QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/kde4/plugins/platforms" ...
          QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/anaconda3/plugins/platforms" ...
          QFactoryLoader::QFactoryLoader() looking at "/usr/bin/anaconda3/plugins/platforms/libqeglfs.so"
          Found metadata in lib /usr/bin/anaconda3/plugins/platforms/libqeglfs.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "eglfs"
                  ]
              },
              "className": "QEglFSIntegrationPlugin",
              "debug": false,
              "version": 329991
          }
          
          
          Got keys from plugin meta data ("eglfs")
          QFactoryLoader::QFactoryLoader() looking at "/usr/bin/anaconda3/plugins/platforms/libqminimal.so"
          Found metadata in lib /usr/bin/anaconda3/plugins/platforms/libqminimal.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "minimal"
                  ]
              },
              "className": "QMinimalIntegrationPlugin",
              "debug": false,
              "version": 329991
          }
          
          
          Got keys from plugin meta data ("minimal")
          QFactoryLoader::QFactoryLoader() looking at "/usr/bin/anaconda3/plugins/platforms/libqminimalegl.so"
          Found metadata in lib /usr/bin/anaconda3/plugins/platforms/libqminimalegl.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "minimalegl"
                  ]
              },
              "className": "QMinimalEglIntegrationPlugin",
              "debug": false,
              "version": 329991
          }
          
          
          Got keys from plugin meta data ("minimalegl")
          QFactoryLoader::QFactoryLoader() looking at "/usr/bin/anaconda3/plugins/platforms/libqoffscreen.so"
          Found metadata in lib /usr/bin/anaconda3/plugins/platforms/libqoffscreen.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "offscreen"
                  ]
              },
              "className": "QOffscreenIntegrationPlugin",
              "debug": false,
              "version": 329991
          }
          
          
          Got keys from plugin meta data ("offscreen")
          QFactoryLoader::QFactoryLoader() looking at "/usr/bin/anaconda3/plugins/platforms/libqvnc.so"
          Found metadata in lib /usr/bin/anaconda3/plugins/platforms/libqvnc.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "vnc"
                  ]
              },
              "className": "QVncIntegrationPlugin",
              "debug": false,
              "version": 329991
          }
          
          
          Got keys from plugin meta data ("vnc")
          QFactoryLoader::QFactoryLoader() looking at "/usr/bin/anaconda3/plugins/platforms/libqxcb.so"
          Found metadata in lib /usr/bin/anaconda3/plugins/platforms/libqxcb.so, metadata=
          {
              "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
              "MetaData": {
                  "Keys": [
                      "xcb"
                  ]
              },
              "className": "QXcbIntegrationPlugin",
              "debug": false,
              "version": 329991
          }
          
          
          Got keys from plugin meta data ("xcb")
          QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/anaconda3/bin/platforms" ...
          Cannot load library /usr/bin/anaconda3/plugins/platforms/libqxcb.so: (/usr/bin/anaconda3/plugins/platforms/../../lib/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
          QLibraryPrivate::loadPlugin failed on "/usr/bin/anaconda3/plugins/platforms/libqxcb.so" : "Cannot load library /usr/bin/anaconda3/plugins/platforms/libqxcb.so: (/usr/bin/anaconda3/plugins/platforms/../../lib/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
          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, minimal, minimalegl, offscreen, vnc, xcb.
          
          Aborted (core dumped)
          

          I tried to install libxcb packages with Yum. But it shows its already installed.

          Package libxcb-1.13-1.el7.x86_64 already installed and latest version
          

          Please suggest what best I can do here to fix the issue? TIA.

          1 Reply Last reply
          0
          • JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by JoeCFD
            #5

            @shivak3 said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:

            platforms/libqxcb.so

            you need this one.
            Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so
            and it is not in your search path.
            Try to set platform path or plugin path for it. QT_PLUGIN_PATH or QT_QPA_PLATFORM

            S 1 Reply Last reply
            0
            • hskoglundH Offline
              hskoglundH Offline
              hskoglund
              wrote on last edited by
              #6

              Hi, if you scroll to the right you'll see the infamous "_ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform" error, I think it occurs due to a mixup of Python's Qt version and the builtin Qt version.
              Google for this error, one solution is here

              S 1 Reply Last reply
              1
              • JoeCFDJ JoeCFD

                @shivak3 said in qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:

                platforms/libqxcb.so

                you need this one.
                Qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so
                and it is not in your search path.
                Try to set platform path or plugin path for it. QT_PLUGIN_PATH or QT_QPA_PLATFORM

                S Offline
                S Offline
                shivak3
                wrote on last edited by
                #7

                @JoeCFD

                Thank you for your reply.

                I see no files under plugins folder....

                Screenshot 2021-12-20 145616.jpg

                1 Reply Last reply
                0
                • hskoglundH hskoglund

                  Hi, if you scroll to the right you'll see the infamous "_ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform" error, I think it occurs due to a mixup of Python's Qt version and the builtin Qt version.
                  Google for this error, one solution is here

                  S Offline
                  S Offline
                  shivak3
                  wrote on last edited by shivak3
                  #8

                  @hskoglund

                  Thank you for your reply.

                  I see many qt related packages. I didn't understand what packages I need to uninstall. Could you please point out for me. Thank you.

                  **(base) [root@RHEL7 ~]$ pip list | grep qt**
                  qtconsole                          4.5.5            
                  sphinxcontrib-qthelp               1.0.2   
                           
                  **(base) [root@RHEL7 ~]$ conda list | grep qt**
                  pyqt                      5.9.2            py37h05f1152_2  
                  pyqt5                     5.15.2                   pypi_0    pypi
                  pyqt5-sip                 12.9.0                   pypi_0    pypi
                  pyqtwebengine             5.12.1                   pypi_0    pypi
                  qt                        5.9.7                h5867ecd_1  
                  qtawesome                 0.6.0                      py_0  
                  qtconsole                 4.5.5                      py_0  
                  qtpy                      1.9.0                      py_0  
                  sphinxcontrib-qthelp      1.0.2                      py_0  
                  
                  **(base) [root@pbsrhst ~]$ rpm -Qe | grep qt**
                  rpm: -Qe: unknown option
                  (base) [root@RHEL7 ~]$ rpm -qa | grep qt
                  pinentry-qt-0.8.1-17.el7.x86_64
                  qt5-qtbase-5.9.7-5.el7_9.x86_64
                  compat-poppler022-qt-0.22.5-4.el7.x86_64
                  qt5-qtbase-common-5.9.7-5.el7_9.noarch
                  qt-mysql-4.8.7-9.el7_9.x86_64
                  qt-4.8.7-9.el7_9.x86_64
                  ibus-qt-1.3.2-4.el7.x86_64
                  qt-settings-19-23.12.el7.noarch
                  qt3-3.3.8b-51.el7.x86_64
                  polkit-qt-0.103.0-10.el7_0.x86_64
                  imsettings-qt-1.6.3-11.el7.x86_64
                  dbusmenu-qt-0.9.2-7.el7.x86_64
                  poppler-qt-0.26.5-43.el7.1.x86_64
                  qt-x11-4.8.7-9.el7_9.x86_64
                  
                  1 Reply Last reply
                  0
                  • hskoglundH Offline
                    hskoglundH Offline
                    hskoglund
                    wrote on last edited by
                    #9

                    Hi, because you have multiple versions of Qt5 installed on your PC, I think the easiest solution is not to uninstall anything, instead switch to another major version of Qt. You have Qt4 and Qt3 already but they are quite old.
                    So my suggestion is to install Qt6, then you will only have one version of it and that error ""_ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform" will go away :-)

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved