Hi, I’m having trouble with the python-pyqtwebengine package from the official Manjaro repository.
- python-pyqtwebengine 5.15.1-2
- python-pyqt5 5.15.1-2
- qt5-webengine 5.15.1-3
- python-pyqt5-sip 12.8.1-1
- python 3.8.6-1
All of the packages are from the official Manjaro repository and are the latest versions made available to users of the Manjaro stable branch.
The installation of all those packages went smoothly, no issues there.
I’ve ensured that I have no Qt5 related packages installed through pip, so all the python Qt5 stuff resides in /usr/lib/python3.8/site-packages/… - the place where pacman put those files.
When I want to make use of a class from the
PyQt5.WebEngineWidgets module by importing it in my python script, Python just gives me a
ModuleNotFoundError: No module named 'PyQt5.WebEngineWidgets'
The script I want to run:
from PyQt5.QtWidgets import QApplication from PyQt5.WebEngineWidgets import QWebEngineView, QWebEnginePage from PyQt5 import QtCore app = QApplication(['']) web = QWebEngineView() page = QWebEnginePage() page.setView(web) web.setPage(page) web.setUrl(QtCore.QUrl('http://www.google.com/')) web.show()
Loading the script into IntelliJ with the Python Community Edition plugin shows that it only has trouble with the WebEngineWidgets stuff, while standard PyQt5 stuff is imported without any problem.
(Only underlines “WebEngineWidgets”, “QWebEngineView” and “QWebEnginePage” in the second line of my script with red)
IntelliJ also revealed something else that I can’t really interpret, but I’m sure it’s somehow important. While building IntelliJs cache, it writes the following lines into its log file:
2020-11-25 09:44:20,314 [ 35728] INFO - letons.PySkeletonGenerator$Run - PyQt5.QtWebEngine ('/usr/lib/python3.8/site-packages/PyQt5/QtWebEngine.abi3.so') 2020-11-25 09:44:20,316 [ 35730] INFO - letons.PySkeletonGenerator$Run - Cache entry for PyQt5.QtWebEngine at '/home/myuser/.cache/JetBrains/IdeaIC2020.2/python_stubs/cache/a0cf3344ab3ffe6a73b2696339330bcfc3f86fdc1b55ec6516b88d6f95a40f2a' indicates failed generation 2020-11-25 09:44:20,316 [ 35730] INFO - letons.PySkeletonGenerator$Run - PyQt5.QtWebEngineCore ('/usr/lib/python3.8/site-packages/PyQt5/QtWebEngineCore.abi3.so') 2020-11-25 09:44:20,317 [ 35731] INFO - letons.PySkeletonGenerator$Run - Cache entry for PyQt5.QtWebEngineCore at '/home/myuser/.cache/JetBrains/IdeaIC2020.2/python_stubs/cache/b9bf9c0955563dc8e1c675f0ed412fc16cd4caebfc50d10c35b7947d2f3c7c03' indicates failed generation 2020-11-25 09:44:20,317 [ 35731] INFO - letons.PySkeletonGenerator$Run - PyQt5.QtWebEngineWidgets ('/usr/lib/python3.8/site-packages/PyQt5/QtWebEngineWidgets.abi3.so') 2020-11-25 09:44:20,318 [ 35732] INFO - letons.PySkeletonGenerator$Run - Cache entry for PyQt5.QtWebEngineWidgets at '/home/myuser/.cache/JetBrains/IdeaIC2020.2/python_stubs/cache/73a2574a935ad959cc9b94e0a585985850c4a8640c0c3ac7c054130ea5799914' indicates failed generation 2020-11-25 09:44:20,319 [ 35733] INFO - letons.PySkeletonGenerator$Run - PyQt5.QtWebKit ('/usr/lib/python3.8/site-packages/PyQt5/QtWebKit.abi3.so') 2020-11-25 09:44:20,320 [ 35734] INFO - letons.PySkeletonGenerator$Run - Cache entry for PyQt5.QtWebKit at '/home/myuser/.cache/JetBrains/IdeaIC2020.2/python_stubs/cache/29683fc0a037f60c779281a03d5c48d1b2cf17288eaffbc61cc4971856012f94' indicates failed generation 2020-11-25 09:44:20,320 [ 35734] INFO - letons.PySkeletonGenerator$Run - PyQt5.QtWebKitWidgets ('/usr/lib/python3.8/site-packages/PyQt5/QtWebKitWidgets.abi3.so') 2020-11-25 09:44:20,328 [ 35742] INFO - letons.PySkeletonGenerator$Run - Cache entry for PyQt5.QtWebKitWidgets at '/home/myuser/.cache/JetBrains/IdeaIC2020.2/python_stubs/cache/b5740d500911fc09b81791eeac64d2232dad0de871c216bf2092d5bbd860a974' indicates failed generation
Those classes (QtWebEngine, QtWebengineCore, QtWebEngineWidgets, QtWebKit and QtWebKitWidgets) are exactly the ones added by python-pyqtwebengine and none of them work as far as I can tell. Other Qt stuff is also listed in that log, and it never says anything about “failed generation” for those classes.
What I need help with
Any advice that would help me fix this problem (allow me to use the WebEngineWidgets module) would be greatly appreciated. Whether or not you’re able to reproduce my problem would also be interesting information (I only have one PC running Manjaro Linux, so my testing capabilities are limited).
If you need any additional information, let me know and I’ll do my best to provide this information.