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)
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved QtWebEngine
8 Posts 5 Posters 522 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.
  • H Offline
    H Offline
    Howetuft
    wrote on 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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

      JonBJ 1 Reply Last reply
      0
      • H Offline
        H Offline
        Howetuft
        wrote on last edited by
        #3

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

        jsulmJ 1 Reply Last reply
        0
        • H Howetuft

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

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on 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
          • SGaistS SGaist

            Hi and welcome to devnet,

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

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on 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....

            SGaistS 1 Reply Last reply
            0
            • JonBJ JonB

              @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....

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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 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
                • F Offline
                  F Offline
                  Faheem_M
                  wrote last edited by
                  #8

                  This command worked for me
                  sudo pacman -S libxml2-legacy

                  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