Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved This application failed to start because no Qt platform plugin could be initialized.

    Qt for Python
    2
    9
    946
    Loading More Posts
    • 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.
    • T
      TheOneManArmy last edited by TheOneManArmy

      Hi I am getting this error and dont understand why

      QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/.conda/envs/ds2/Library/plugins/platforms" ...
      QFactoryLoader::QFactoryLoader() looking at "C:/Users/.conda/envs/ds2/Library/plugins/platforms/qdirect2d.dll"
      Found invalid metadata in lib C:/Users/.conda/envs/ds2/Library/plugins/platforms/qdirect2d.dll: Invalid metadata version
      "Failed to extract plugin meta data from 'C:/Users/.conda/envs/ds2/Library/plugins/platforms/qdirect2d.dll'"
      not a plugin
      QFactoryLoader::QFactoryLoader() looking at "C:/Users/.conda/envs/ds2/Library/plugins/platforms/qminimal.dll"
      Found invalid metadata in lib C:/Users/.conda/envs/ds2/Library/plugins/platforms/qminimal.dll: Invalid metadata version
      "Failed to extract plugin meta data from 'C:/Users/.conda/envs/ds2/Library/plugins/platforms/qminimal.dll'"
      not a plugin
      QFactoryLoader::QFactoryLoader() looking at "C:/Users/.conda/envs/ds2/Library/plugins/platforms/qoffscreen.dll"
      Found invalid metadata in lib C:/Users/.conda/envs/ds2/Library/plugins/platforms/qoffscreen.dll: Invalid metadata version
      "Failed to extract plugin meta data from 'C:/Users/.conda/envs/ds2/Library/plugins/platforms/qoffscreen.dll'"
      not a plugin
      QFactoryLoader::QFactoryLoader() looking at "C:/Users/.conda/envs/ds2/Library/plugins/platforms/qwindows.dll"
      Found invalid metadata in lib C:/Users/.conda/envs/ds2/Library/plugins/platforms/qwindows.dll: Invalid metadata version
      "Failed to extract plugin meta data from 'C:/Users/.conda/envs/ds2/Library/plugins/platforms/qwindows.dll'"
      not a plugin
      QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/.conda/envs/ds2/platforms" ...
      qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
      This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

      I created a env with 3.9 python installed the pyside6 and run the application and works fine, but after I installed jupyter notebook in this env then I get this error, and I dont get why.

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        There's your issue. You have multiple installation of Qt as well doing so.

        I do not think PySide6 is already available on conda but you have PySide2 that is.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 1
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi and welcome to devnet,

          Can you check where the plugins are loaded from with your original environment ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          T 2 Replies Last reply Reply Quote 0
          • T
            TheOneManArmy @SGaist last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • T
              TheOneManArmy @SGaist last edited by TheOneManArmy

              @SGaist I manage to find the difference it changes the plugin folder location, one is C:\Users.conda\envs\gui\Lib\site-packages\PySide6\plugins the one that works correctly, and the other is on C:\Users.conda\envs\test\Library\plugins
              I replaced the folders that were invalid but I dont know if this is the appropiate solution? It runs now appropiate but I dont know if I begin using other things this will break again.

              Do you know how to redirect the path for this? Thanks!

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                That's the kind of manipulation that should not be needed.

                I would try using a clean environment just to be sure everything works appropriately.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                T 1 Reply Last reply Reply Quote 0
                • T
                  TheOneManArmy @SGaist last edited by

                  @SGaist said in This application failed to start because no Qt platform plugin could be initialized.:

                  I would try using a clean environment just to be sure everything

                  I have created multiple env for testing this, and some of the python packages mess with this, matplotlib and jupyter are some examples, they change that particular path, what can I do to correct this without manipulating the files?

                  Thanks!

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    Are they coming from different channels ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      TheOneManArmy @SGaist last edited by

                      @SGaist I am not sure I understand what you are asking, but I am using anaconda/conda for creating different envs, and on each new env when I install via pip install pyside6 qt works fine, but then I begin installing other packages via conda install such as matplotlib and jupyter notebook, and here is where the error appears.

                      I hope with that I answer the question,

                      Thanks!

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        There's your issue. You have multiple installation of Qt as well doing so.

                        I do not think PySide6 is already available on conda but you have PySide2 that is.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post