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 on RHEL 7 problem

PySide6 on RHEL 7 problem

Scheduled Pinned Locked Moved Unsolved Qt for Python
9 Posts 5 Posters 2.0k 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.
  • R Offline
    R Offline
    rbpolaris
    wrote on last edited by
    #1

    I compiled Qt 6.1 from source on Redhat Enterprise Linux 7 successfully, installed to custom location and set QTDIR to that location.

    I then followed the directions for installing the PySide6 package from https://doc.qt.io/qtforpython/quickstart.html by first creating a virtual environment, activating it, and then pip installing PySide6. (using Python 3.9.2)

    The problems start when trying to simply test the installation as shown on the same page...

    import PySide6.QtCore
    # Prints PySide6 version
    print(PySide6.__version__)
    
    6.1.0
    
    # Prints the Qt version used to compile PySide6
    print(PySide6.QtCore.__version__)
    
    Traceback  (most recent call last):
    File "<stdin>",  line 1, in <module>
    AttributeError: Module 'PySide6' has no attribute 'QtCore'
    
    

    I have successfully gotten PySide6 to work on Ubuntu Linux running on WSL2 in the same manner (compiling Qt 6.1 from source and pip installing PySide6).

    Any idea what's going on here?

    Thanks.

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

      Hi and welcome to devnet,

      To the best of my knowledge, there's no need to build your own Qt when installing PySide6 from pip.

      What might happen is that it fails to load the Qt libraries that comes with it.

      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
      0
      • R Offline
        R Offline
        rbpolaris
        wrote on last edited by
        #3

        Thanks for suggesting this...I tested it out on WSL2 at home today and sure enough, it appears to not need a separate install of Qt on the system ... this was unclear to me in the documentation. I've used Qt/C++ for 20+ years, but am new to the python bindings.

        However, on this system where I hadn't previously added all the prerequisite libraries in order to compile Qt Source (xcb, xkb, etc..) , I had to add them to get the PySide6 pip install to run. This was definately not mentioned in the PySide documentation.

        I will attempt to figure out the RHEL issue again on Monday...that system does have all the libraries for compiling source already, so hopefully it's just getting confused by either the QTDIR, PATH, or LD_LIBRARY_PATH that's set. Will update here then.

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

          Start your application with the QT_DEBUG_PLUGINS environment variable set to 1.

          If will give you information about what is happening with the plugins. The xcb in your case.

          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
          0
          • R Offline
            R Offline
            rbpolaris
            wrote on last edited by rbpolaris
            #5

            So digging in to sort out why PySide6 pip install doesn't work on RHEL 7...

            Looks like the basic problem is that libQt6Core among other libs have a GLIBC_2.25 and GLIBC_2.28 requirement that does not exist on this version of the OS.

            Looks like my best recourse is to step back and natively compile the PySide6 source. So much for the dream of a simple pip install and update process.

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

              One thing you can try is conda.

              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
              0
              • R rbpolaris

                So digging in to sort out why PySide6 pip install doesn't work on RHEL 7...

                Looks like the basic problem is that libQt6Core among other libs have a GLIBC_2.25 and GLIBC_2.28 requirement that does not exist on this version of the OS.

                Looks like my best recourse is to step back and natively compile the PySide6 source. So much for the dream of a simple pip install and update process.

                J Offline
                J Offline
                JoelA
                wrote on last edited by
                #7

                @rbpolaris Hi! Were you able to resolve this issue? If so, would you mind sharing your solution? I think I'm experiencing the same problems when trying to install PySide6 on RHEL 8. Any help will be greatly appreciated. Thank you in advance!

                CristianMaureiraC 1 Reply Last reply
                0
                • J JoelA

                  @rbpolaris Hi! Were you able to resolve this issue? If so, would you mind sharing your solution? I think I'm experiencing the same problems when trying to install PySide6 on RHEL 8. Any help will be greatly appreciated. Thank you in advance!

                  CristianMaureiraC Offline
                  CristianMaureiraC Offline
                  CristianMaureira
                  wrote on last edited by
                  #8

                  @JoelA said in PySide6 on RHEL 7 problem:

                  @rbpolaris Hi! Were you able to resolve this issue? If so, would you mind sharing your solution? I think I'm experiencing the same problems when trying to install PySide6 on RHEL 8. Any help will be greatly appreciated. Thank you in advance!

                  PySide's CI has one configuration with RHEL 8.4 and gcc 10.3.1, you should be able to run pip install pyside6 without any problem. Which errors are you getting?

                  1 Reply Last reply
                  0
                  • Stefan ScherfkeS Offline
                    Stefan ScherfkeS Offline
                    Stefan Scherfke
                    wrote on last edited by
                    #9

                    Maybe this helps: https://forum.qt.io/topic/136058/libqt6core-so-6-cannot-open-shared-object-file-even-though-it-exists-seems-to-depend-on-docker-host-os/2

                    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