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. How use PySide2.QtCharts
Forum Updated to NodeBB v4.3 + New Features

How use PySide2.QtCharts

Scheduled Pinned Locked Moved Solved Qt for Python
11 Posts 5 Posters 1.8k Views 1 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.
  • M Offline
    M Offline
    Mikeeeeee
    wrote on last edited by
    #1

    Hi!
    I use Ubuntu 20.
    Please tell me how to configure PySide2 to work with PySide 2.QtCharts?
    I tried to install PySide2 in PyCharm, but got An error:

    File "/home/admin1/PytonProjects/ForQtMIFI/widgets/systemLoad2.py", line 10, in <module>
        from PySide2 import QtCharts
    ImportError: /lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.14' not found (required by /home/admin1/.local/lib/python3.8/site-packages/PySide2/libpyside2.abi3.so.5.14)
    

    At the same time, you should use Qt of the required version. I tried to add the path in the interpreter, but it didn't help:

    /home/admin1/Qt/5.14.2/gcc_64/lib
    
    jsulmJ 1 Reply Last reply
    0
    • M Mikeeeeee

      Hi!
      I use Ubuntu 20.
      Please tell me how to configure PySide2 to work with PySide 2.QtCharts?
      I tried to install PySide2 in PyCharm, but got An error:

      File "/home/admin1/PytonProjects/ForQtMIFI/widgets/systemLoad2.py", line 10, in <module>
          from PySide2 import QtCharts
      ImportError: /lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.14' not found (required by /home/admin1/.local/lib/python3.8/site-packages/PySide2/libpyside2.abi3.so.5.14)
      

      At the same time, you should use Qt of the required version. I tried to add the path in the interpreter, but it didn't help:

      /home/admin1/Qt/5.14.2/gcc_64/lib
      
      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Mikeeeeee How did you install PySide2?

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

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mikeeeeee
        wrote on last edited by
        #3

        I install PySide2 from PyCharm

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

          Hi,

          Where exactly was it installed ?

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

          M 1 Reply Last reply
          1
          • eyllanescE Offline
            eyllanescE Offline
            eyllanesc
            wrote on last edited by
            #5

            try add:

            import PySide2 
            import os.path  
            
            pyside2_dir = os.path.dirname(PySide2.__file__) 
            os.environ["PATH"] += os.pathsep + pyside2_dir
            

            before from PySide2 import XXX

            If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

            M 1 Reply Last reply
            0
            • SGaistS SGaist

              Hi,

              Where exactly was it installed ?

              M Offline
              M Offline
              Mikeeeeee
              wrote on last edited by
              #6

              @SGaist I instal PySide2 v 5.14.2

              1 Reply Last reply
              0
              • eyllanescE eyllanesc

                try add:

                import PySide2 
                import os.path  
                
                pyside2_dir = os.path.dirname(PySide2.__file__) 
                os.environ["PATH"] += os.pathsep + pyside2_dir
                

                before from PySide2 import XXX

                M Offline
                M Offline
                Mikeeeeee
                wrote on last edited by
                #7

                @eyllanesc maybe it doesn't work because I use PyQt5 and PySide 2?

                jsulmJ 1 Reply Last reply
                0
                • M Mikeeeeee

                  @eyllanesc maybe it doesn't work because I use PyQt5 and PySide 2?

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Mikeeeeee said in How use PySide2.QtCharts:

                  I use PyQt5 and PySide 2

                  Do you mean at the same time in same application?

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

                  M 1 Reply Last reply
                  2
                  • jsulmJ jsulm

                    @Mikeeeeee said in How use PySide2.QtCharts:

                    I use PyQt5 and PySide 2

                    Do you mean at the same time in same application?

                    M Offline
                    M Offline
                    Mikeeeeee
                    wrote on last edited by
                    #9

                    @jsulm Yes. I need QGIS. It only works with the stable version of PyQt. But the stable version of PyQt doesn't have PyQtCharts. I'm trying to connect PyQtCharts somehow.

                    JonBJ eyllanescE 2 Replies Last reply
                    0
                    • M Mikeeeeee

                      @jsulm Yes. I need QGIS. It only works with the stable version of PyQt. But the stable version of PyQt doesn't have PyQtCharts. I'm trying to connect PyQtCharts somehow.

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

                      @Mikeeeeee
                      Are you really saying you are trying to use both PyQt5 and PySide2 in the same application? But you didn't mention this in your question? Just because you need some packages which are available only in one of the two doesn't mean you can just choose to mix them because you want to.

                      1 Reply Last reply
                      2
                      • M Mikeeeeee

                        @jsulm Yes. I need QGIS. It only works with the stable version of PyQt. But the stable version of PyQt doesn't have PyQtCharts. I'm trying to connect PyQtCharts somehow.

                        eyllanescE Offline
                        eyllanescE Offline
                        eyllanesc
                        wrote on last edited by
                        #11

                        @Mikeeeeee you should not use both libraries, what I suspect is that PyQt5 has been compiled with a different version of Qt than PySide2 was compiled causing the conflict.

                        If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

                        1 Reply Last reply
                        2

                        • Login

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