Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. PyQt6-QtWebEngine: missing libxml2.so.2 (Arch linux)

PyQt6-QtWebEngine: missing libxml2.so.2 (Arch linux)

Scheduled Pinned Locked Moved Unsolved QtWebEngine
7 Posts 4 Posters 202 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
    Howetuft
    wrote 14 days ago last edited by
    #1

    Hello,

    I'm on Arch Linux and I cannot import PyQt6.QtWebEngine in Python, due to missing library libxml2.so.2

    Steps to reproduce:

    $ virtualenv test-pyqt6 && source test-pyqt6/bin/activate
    $ pip install PyQt6-WebEngine
    $ python -c "from PyQt6.QtWebEngineCore import *"
    

    I get:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
        from PyQt6.QtWebEngineCore import *
    ImportError: libxml2.so.2: cannot open shared object file: No such file or directory
    

    Note that I get the same error with PySide6 as well:

    $ virtualenv test-pyside6 && source test-pyside6/bin/activate
    $ pip install PySide6-Addons
    $ python -c "from PySide6.QtWebEngineCore import *"
    

    My understanding:
    It looks like PyQt6. QtWebEngineCore relies on system libxml2, and PyQt6 requires libxml2.so.2, whereas Arch Linux provides libxml2.so.16, thus the error.

    However libxml2 is not listed in the exceptions in the PEP (https://peps.python.org/pep-0599/#the-manylinux2014-policy), so IMHO the wheel should not rely on system libxml2, but should embed its own version.

    Am I missing something?

    Many thanks in advance...

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote 14 days ago last edited by
      #2

      Hi and welcome to devnet,

      That's an issue you should bring to the PyQt folks at Riverbank Computing.

      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 13 days ago
      0
      • H Offline
        H Offline
        Howetuft
        wrote 13 days ago last edited by
        #3

        Thank you! Do you know where I can reach them?

        J 1 Reply Last reply 13 days ago
        0
        • H Howetuft
          13 days ago

          Thank you! Do you know where I can reach them?

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote 13 days ago last edited by
          #4

          @Howetuft said in PyQt6-QtWebEngine: missing libxml2.so.2 (Arch linux):

          Do you know where I can reach them?

          https://www.riverbankcomputing.com/mailman/listinfo/pyqt

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

          1 Reply Last reply
          0
          • S SGaist
            14 days ago

            Hi and welcome to devnet,

            That's an issue you should bring to the PyQt folks at Riverbank Computing.

            J Offline
            J Offline
            JonB
            wrote 13 days ago last edited by
            #5

            @SGaist said in PyQt6-QtWebEngine: missing libxml2.so.2 (Arch linux):

            That's an issue you should bring to the PyQt folks at Riverbank Computing.

            But the OP reported:

            Note that I get the same error with PySide6 as well:

            ? If that is true --- it can be totally reproduced with PySide6 and no PyQt6 --- then it is just as much an issue here as Riverbank....

            S 1 Reply Last reply 13 days ago
            0
            • J JonB
              13 days ago

              @SGaist said in PyQt6-QtWebEngine: missing libxml2.so.2 (Arch linux):

              That's an issue you should bring to the PyQt folks at Riverbank Computing.

              But the OP reported:

              Note that I get the same error with PySide6 as well:

              ? If that is true --- it can be totally reproduced with PySide6 and no PyQt6 --- then it is just as much an issue here as Riverbank....

              S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote 13 days ago last edited by
              #6

              @JonB good point, my tired eyes missed that couple of lines somehow. That said, I still think it's a good idea to let Riverbank Computing know about this issue.

              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
              • H Offline
                H Offline
                Howetuft
                wrote 11 days ago last edited by
                #7

                Hello,

                Thank you for your answer. Just to keep you informed: at the same time I was writing here, another user also raised the issue to RiverBanks (https://www.riverbankcomputing.com/pipermail/pyqt/2025-May/046232.html), so I didn't post. The issue then bounced back to Qt:
                https://bugreports.qt.io/browse/QTBUG-136637

                I confirm problem occurs also with PySide6.

                1 Reply Last reply
                2

                7/7

                8 May 2025, 05:05

                • Login

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