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. [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""

[SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""

Scheduled Pinned Locked Moved Solved Installation and Deployment
29 Posts 11 Posters 172.1k 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.
  • H Offline
    H Offline
    hskoglund
    wrote on 29 Jan 2022, 14:26 last edited by
    #19

    Hi, do you get the same error if you try a vanilla Hello World python app?
    Say like this:

    app = QApplication(sys,argv)
    window = QWidget()
    window.setWindowTitle('Hello world')
    window.setGeometry(100, 100, 640, 480)
    window.show()
    sys.exit(app.exec_())
    
    L 2 Replies Last reply 30 Jan 2022, 01:35
    0
    • H hskoglund
      29 Jan 2022, 14:26

      Hi, do you get the same error if you try a vanilla Hello World python app?
      Say like this:

      app = QApplication(sys,argv)
      window = QWidget()
      window.setWindowTitle('Hello world')
      window.setGeometry(100, 100, 640, 480)
      window.show()
      sys.exit(app.exec_())
      
      L Offline
      L Offline
      LiZheCN
      wrote on 30 Jan 2022, 01:35 last edited by
      #20

      @hskoglund Without reboot a simple qt hello world project can run. After reboot every thing goes fine. Thank you for you time.

      1 Reply Last reply
      0
      • H hskoglund
        29 Jan 2022, 14:26

        Hi, do you get the same error if you try a vanilla Hello World python app?
        Say like this:

        app = QApplication(sys,argv)
        window = QWidget()
        window.setWindowTitle('Hello world')
        window.setGeometry(100, 100, 640, 480)
        window.show()
        sys.exit(app.exec_())
        
        L Offline
        L Offline
        LiZheCN
        wrote on 31 Jan 2022, 09:45 last edited by LiZheCN
        #21

        @hskoglund Sorry to bother you again, the issue keep coming out after somethime. And I dont know how to solve it, for now.
        I cant start my kate(build-in editor in manajaro)
        26e0c01d-09b7-42dc-8aed-b5f01ba146cc-image.png

        And the error message is:

        QObject::moveToThread: Current thread (0x55b676c29770) is not the object's thread (0x55b676c337c0).
        Cannot move to target thread (0x55b676c29770)
        
        qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins" 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: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx.
        
        fish: Job 1, 'kate' terminated by signal SIGABRT (Abort)
        

        After the reboot the issue is gone for just a while. How to solve it?

        My system info is:

         OS: Manjaro 21.2.2 Qonos
         Kernel: x86_64 Linux 5.15.16-1-MANJARO
         Uptime: 8h 2m
         Packages: 1397
         Shell: python
         Resolution: 3840x1080
         DE: KDE5 / Plasma 
         WM: KWin
         GTK Theme: Breeze [GTK2/3]
         Icon Theme: breeze-dark
         Disk: 33G / 236G (15%)
         CPU: Intel Core i7-7700K @ 8x 4.5GHz [56.0°C]
         GPU: Intel Corporation HD Graphics 630 (rev 04)
         RAM: 7016MiB / 15866MiB
        
        Python 3.10.1
        
        NVIM v0.6.1
        Build type: Release
        LuaJIT 2.0.5
        Compiled by builduser
        
        Features: +acl +iconv +tui
        See ":help feature-compile"
        
           system vimrc file: "$VIM/sysinit.vim"
          fall-back for $VIM: "/usr/share/nvim"
        
        Run :checkhealth for more info
        
        alacritty 0.9.0 (fed349aa)
        
        

        See if you need other info?

        J 1 Reply Last reply 31 Jan 2022, 09:51
        0
        • L LiZheCN
          31 Jan 2022, 09:45

          @hskoglund Sorry to bother you again, the issue keep coming out after somethime. And I dont know how to solve it, for now.
          I cant start my kate(build-in editor in manajaro)
          26e0c01d-09b7-42dc-8aed-b5f01ba146cc-image.png

          And the error message is:

          QObject::moveToThread: Current thread (0x55b676c29770) is not the object's thread (0x55b676c337c0).
          Cannot move to target thread (0x55b676c29770)
          
          qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins" 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: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx.
          
          fish: Job 1, 'kate' terminated by signal SIGABRT (Abort)
          

          After the reboot the issue is gone for just a while. How to solve it?

          My system info is:

           OS: Manjaro 21.2.2 Qonos
           Kernel: x86_64 Linux 5.15.16-1-MANJARO
           Uptime: 8h 2m
           Packages: 1397
           Shell: python
           Resolution: 3840x1080
           DE: KDE5 / Plasma 
           WM: KWin
           GTK Theme: Breeze [GTK2/3]
           Icon Theme: breeze-dark
           Disk: 33G / 236G (15%)
           CPU: Intel Core i7-7700K @ 8x 4.5GHz [56.0°C]
           GPU: Intel Corporation HD Graphics 630 (rev 04)
           RAM: 7016MiB / 15866MiB
          
          Python 3.10.1
          
          NVIM v0.6.1
          Build type: Release
          LuaJIT 2.0.5
          Compiled by builduser
          
          Features: +acl +iconv +tui
          See ":help feature-compile"
          
             system vimrc file: "$VIM/sysinit.vim"
            fall-back for $VIM: "/usr/share/nvim"
          
          Run :checkhealth for more info
          
          alacritty 0.9.0 (fed349aa)
          
          

          See if you need other info?

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 31 Jan 2022, 09:51 last edited by
          #22

          @LiZheCN said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":

          How to solve it?

          Set QT_DEBUG_PLUGINS to one before starting the app:

          export QT_DEBUG_PLUGINS=1
          kate
          

          Post the output.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          L 1 Reply Last reply 31 Jan 2022, 11:01
          0
          • J jsulm
            31 Jan 2022, 09:51

            @LiZheCN said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":

            How to solve it?

            Set QT_DEBUG_PLUGINS to one before starting the app:

            export QT_DEBUG_PLUGINS=1
            kate
            

            Post the output.

            L Offline
            L Offline
            LiZheCN
            wrote on 31 Jan 2022, 11:01 last edited by
            #23

            @jsulm

            The log is too long I put it on this site. Thank you

            https://github.com/woshichuanqilz/others/blob/master/log

            J 1 Reply Last reply 31 Jan 2022, 11:10
            0
            • L LiZheCN
              31 Jan 2022, 11:01

              @jsulm

              The log is too long I put it on this site. Thank you

              https://github.com/woshichuanqilz/others/blob/master/log

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 31 Jan 2022, 11:10 last edited by
              #24

              @LiZheCN This looks very strange:

              Got keys from plugin meta data ("xcb")
              QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
              loaded library "/home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
              QObject::moveToThread: Current thread (0x563183178770) is not the object's thread (0x563183184ca0).
              Cannot move to target thread (0x563183178770)
              

              All other plug-ins are loaded from /usr/lib/qt/plugins, not /home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins
              Do you have /home/lizhe/.local/lib/python3.10 in your PATH?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              L 1 Reply Last reply 31 Jan 2022, 11:22
              0
              • J jsulm
                31 Jan 2022, 11:10

                @LiZheCN This looks very strange:

                Got keys from plugin meta data ("xcb")
                QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
                loaded library "/home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
                QObject::moveToThread: Current thread (0x563183178770) is not the object's thread (0x563183184ca0).
                Cannot move to target thread (0x563183178770)
                

                All other plug-ins are loaded from /usr/lib/qt/plugins, not /home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins
                Do you have /home/lizhe/.local/lib/python3.10 in your PATH?

                L Offline
                L Offline
                LiZheCN
                wrote on 31 Jan 2022, 11:22 last edited by LiZheCN
                #25

                @jsulm said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":

                /home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins

                Yes I have this dir

                The libxcb.so file I put it here, in case you need it

                https://github.com/woshichuanqilz/others/blob/master/libqxcb.so

                3d5cf45b-0ddb-4f86-abd0-7b6c8a0a0e76-image.png

                J 1 Reply Last reply 31 Jan 2022, 12:23
                0
                • L LiZheCN
                  31 Jan 2022, 11:22

                  @jsulm said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":

                  /home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins

                  Yes I have this dir

                  The libxcb.so file I put it here, in case you need it

                  https://github.com/woshichuanqilz/others/blob/master/libqxcb.so

                  3d5cf45b-0ddb-4f86-abd0-7b6c8a0a0e76-image.png

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 31 Jan 2022, 12:23 last edited by
                  #26

                  @LiZheCN said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":

                  in case you need it

                  I don't need it.
                  The thing is that kate should not load this plug-in from that location but from /usr/lib/qt/plugins!
                  Try to rename libxcb.so in /home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins to see whether this solves your issue.
                  And you did not answer my question.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  L 1 Reply Last reply 31 Jan 2022, 13:41
                  0
                  • J jsulm
                    31 Jan 2022, 12:23

                    @LiZheCN said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":

                    in case you need it

                    I don't need it.
                    The thing is that kate should not load this plug-in from that location but from /usr/lib/qt/plugins!
                    Try to rename libxcb.so in /home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins to see whether this solves your issue.
                    And you did not answer my question.

                    L Offline
                    L Offline
                    LiZheCN
                    wrote on 31 Jan 2022, 13:41 last edited by LiZheCN
                    #27

                    @jsulm

                    What is your question ?

                    you mean this? :
                    Do you have /home/lizhe/.local/lib/python3.10 in your PATH?

                    I answered here.

                    593a72b0-931b-4a80-a9dd-6af7ff5d44e5-image.png

                    Hope I havent missed something

                    I will change the name of the so file. When this issue come out again. When I get the result I will give a reply. Thank you a lot for your help, really. I already to reinstall the system already. : P

                    J 1 Reply Last reply 31 Jan 2022, 13:47
                    0
                    • L LiZheCN
                      31 Jan 2022, 13:41

                      @jsulm

                      What is your question ?

                      you mean this? :
                      Do you have /home/lizhe/.local/lib/python3.10 in your PATH?

                      I answered here.

                      593a72b0-931b-4a80-a9dd-6af7ff5d44e5-image.png

                      Hope I havent missed something

                      I will change the name of the so file. When this issue come out again. When I get the result I will give a reply. Thank you a lot for your help, really. I already to reinstall the system already. : P

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 31 Jan 2022, 13:47 last edited by
                      #28

                      @LiZheCN said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":

                      you mean this?

                      Yes, but the question is not whether that folder exists (it does of course), but whether this path is set in your PATH environment variable (or any other environment variable).

                      echo $PATH
                      

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      L 1 Reply Last reply 31 Jan 2022, 13:59
                      0
                      • J jsulm
                        31 Jan 2022, 13:47

                        @LiZheCN said in [SOLVED] qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "":

                        you mean this?

                        Yes, but the question is not whether that folder exists (it does of course), but whether this path is set in your PATH environment variable (or any other environment variable).

                        echo $PATH
                        
                        L Offline
                        L Offline
                        LiZheCN
                        wrote on 31 Jan 2022, 13:59 last edited by LiZheCN
                        #29

                        @jsulm

                        I change the name of libxcb.so to libxcb.so1 it still loaded. and get the same error.
                        I remove the libxcb.so file in /home/lizhe/.local/lib/python3.10/site-packages/cv2/qt/plugins. Everything seems works fine now.
                        Thank you.

                        Here is the output:
                        echo $PATH

                        /home/lizhe/Applications/Clash /home/lizhe/Applications/Clion/bin /home/lizhe/OriNote/linuxConfig/CommonScripts /home/lizhe/Applications /home/lizhe/.local/bin/ /home/lizhe/OriNote/wikiScripts /home/lizhe/.yarn/bin/ /home/lizhe/Applications/VSCode/ /home/lizhe/Applications/clion-2021.3.2/bin /home/lizhe/Applications/pycharm-2021.3.1/bin/ /home/lizhe/OriNote/wikiScripts/Utils /home/lizhe/OriNote/wikiScripts /home/lizhe/Applications/Clash /home/lizhe/Applications/Clion/bin /home/lizhe/OriNote/linuxConfig/CommonScripts /home/lizhe/Applications /home/lizhe/.local/bin/ /home/lizhe/OriNote/wikiScripts /home/lizhe/.yarn/bin/ /home/lizhe/Applications/VSCode/ /home/lizhe/Applications/clion-2021.3.2/bin /home/lizhe/Applications/pycharm-2021.3.1/bin/ /home/lizhe/OriNote/wikiScripts/Utils /home/lizhe/OriNote/wikiScripts /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /var/lib/snapd/snap/bin
                        
                        1 Reply Last reply
                        0
                        • P prehmo referenced this topic on 18 Jul 2023, 11:52
                        • P prehmo referenced this topic on 19 Jul 2023, 11:09
                        • L luca29q referenced this topic on 28 Mar 2024, 07:10

                        28/29

                        31 Jan 2022, 13:47

                        • Login

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