Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. PySide6 does not work with Anaconda

PySide6 does not work with Anaconda

Scheduled Pinned Locked Moved Solved Qt for Python
13 Posts 3 Posters 8.1k Views 2 Watching
  • 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.
  • JonBJ JonB

    @Johan_R
    I think this is indeed some anaconda issue, and you will struggle to get a definitive answer here from what I have seen. Googling qt "Invalid metadata version" anaconda does not reveal many hits. I would suggest you look through the long post at https://github.com/ContinuumIO/anaconda-issues/issues/1270. I know it's from 2016 but it's the best I could find. Suggestions seem to revolve around what your PATH is, and to at least try copying these anaconda libraries to a different location in the anaconda area? I think you will have to try some play experimenting....

    J Offline
    J Offline
    Johan_R
    wrote on last edited by
    #4

    @JonB said in PySide6 does not work with Anaconda:

    https://github.com/ContinuumIO/anaconda-issues/issues/1270

    Thanks for taking the time too look into this. I tried some of the remedies proposed in that thread but with no success so far. I do not think it is the same issue. That thread deals with the situation that the platform plugins are not found at all. The thread does not mention metadata at all. In my case they are found but the metadata is somehow invalid which suggests that something else has gone wrong earlier.

    JonBJ 1 Reply Last reply
    0
    • J Johan_R

      @JonB said in PySide6 does not work with Anaconda:

      https://github.com/ContinuumIO/anaconda-issues/issues/1270

      Thanks for taking the time too look into this. I tried some of the remedies proposed in that thread but with no success so far. I do not think it is the same issue. That thread deals with the situation that the platform plugins are not found at all. The thread does not mention metadata at all. In my case they are found but the metadata is somehow invalid which suggests that something else has gone wrong earlier.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #5

      @Johan_R
      You may well be right. The idea was to read to figure what gets what from where.

      This is my last wild suggestion, because obviously I don't know. You say it works outside anaconda but not inside anaconda. Presumably those anaconda3/Library/plugins/platforms/q*.dll exist somewhere else not inside the anaconda area? Assuming so: compare some of the files. I suppose they are different? Are the anaconda ones the same architecture, I'm thinking they need to be 64-bit not 32-bit? What if you temporarily make yours use the non-anaconda ones, either by some PATH or whatever manipulation, or just by temporarily copying/renaming so that directory contains non-anaconda ones? Just an idea, to try to diagnose....

      J 1 Reply Last reply
      1
      • JonBJ JonB

        @Johan_R
        You may well be right. The idea was to read to figure what gets what from where.

        This is my last wild suggestion, because obviously I don't know. You say it works outside anaconda but not inside anaconda. Presumably those anaconda3/Library/plugins/platforms/q*.dll exist somewhere else not inside the anaconda area? Assuming so: compare some of the files. I suppose they are different? Are the anaconda ones the same architecture, I'm thinking they need to be 64-bit not 32-bit? What if you temporarily make yours use the non-anaconda ones, either by some PATH or whatever manipulation, or just by temporarily copying/renaming so that directory contains non-anaconda ones? Just an idea, to try to diagnose....

        J Offline
        J Offline
        Johan_R
        wrote on last edited by
        #6

        I tried with MIniconda instead of Anaconda.
        (Miniconda is minimal conda version. It includes only conda, Python,and a small number of other usefu l packages. One can then install additional conda packages from the conda repository.)

        Miniconda + PySide6 works. It still works after I install numpy and pandas. But when I install matpotlib it stops working, with the same error message as before. So it seems that PySide6 is not compatible with matplotlib.

        Thanks for the help @JonB. I'll ask about this in a matplotlib forum.

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #7

          Hi,

          It's rather the other way around. Anaconda might not be providing a Matplotlib release with a backend for PySide6.

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

          J 1 Reply Last reply
          1
          • SGaistS SGaist

            Hi,

            It's rather the other way around. Anaconda might not be providing a Matplotlib release with a backend for PySide6.

            J Offline
            J Offline
            Johan_R
            wrote on last edited by Johan_R
            #8

            @SGaist I tried with PySide2 instead of Pyside6. I used a fresh Miniconda installation and I ran a PySide2 version of the Hello World program above.
            Same behavior as before. It works with Miniconda + PySide2, keeps working after I install numpy and pandas, and stops working when I install matplotlib. The error message is almost the same as before

            qt.qpa.plugin: Could not load the Qt platform plugin "windows" 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: direct2d, minimal, offscreen, windows.
            
            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #9

              Can you check where the plugins are loaded from before and after installing matplotlib ?

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

              J 1 Reply Last reply
              1
              • SGaistS SGaist

                Can you check where the plugins are loaded from before and after installing matplotlib ?

                J Offline
                J Offline
                Johan_R
                wrote on last edited by Johan_R
                #10

                @SGaist

                Before:
                C:\Users\Rade\miniconda3\Lib\site-packages\PySide2\plugins\platforms\qwindows.dll

                After:
                C:\Users\Rade\miniconda3\Library\plugins\platforms\qwindows.dll

                The folder C:\Users\Rade\miniconda3\Library\plugins does not exist before matplotlib is installed

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #11

                  Then looks like it comes with its own build of Qt and they clash with the one of PySide2.

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

                  J 2 Replies Last reply
                  1
                  • SGaistS SGaist

                    Then looks like it comes with its own build of Qt and they clash with the one of PySide2.

                    J Offline
                    J Offline
                    Johan_R
                    wrote on last edited by
                    #12
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Then looks like it comes with its own build of Qt and they clash with the one of PySide2.

                      J Offline
                      J Offline
                      Johan_R
                      wrote on last edited by Johan_R
                      #13

                      @SGaist You are absolutely right. matplotlib comes bundled with PySide6. If I install matplotlib and do not install my own PySide6, then the above Hello World program runs as expected. Problem solved.

                      Many thanks to @JonB and @SGaist for helping out with this!

                      1 Reply Last reply
                      1

                      • Login

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