PyQt6-QtWebEngine: missing libxml2.so.2 (Arch linux)
-
wrote 14 days ago last edited by
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...
-
Hi and welcome to devnet,
That's an issue you should bring to the PyQt folks at Riverbank Computing.
-
wrote 13 days ago last edited by
Thank you! Do you know where I can reach them?
-
@Howetuft said in PyQt6-QtWebEngine: missing libxml2.so.2 (Arch linux):
Do you know where I can reach them?
-
Hi and welcome to devnet,
That's an issue you should bring to the PyQt folks at Riverbank Computing.
wrote 13 days ago last edited by@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....
-
@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....
@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.
-
wrote 11 days ago last edited by
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-136637I confirm problem occurs also with PySide6.
7/7