Load a html file: No name 'QtWebEngineWidgets' in module 'PyQt5'
Hi,
I'm trying to load a html file inside a windows but I'm not able to import 'QtWebEngineWidgets' .
I'm using Fedora 29 and I've installed by pip the PQt5 version 5.11.3.
I'm not sure what should I do. Someone suggest to downgrade the PyQt5 version, but I'm sure there should be a smart and more efficient way.
Any suggestion?
The code is really simple:
Code:
web = QWebEngineView()
web.
load(QUrl("file:///tmp/diff2HtmlCompare-master/index.html")) web.show()
Thanks,
M
Re: Load a html file: No name 'QtWebEngineWidgets' in module 'PyQt5'
Maybe it is packaged as a separate module/package?
When I run "pip search" here on my system I can see a package called "PyQtWebEngine"
Maybe you need that one as well.
Alternatively you could try installing the respective packages of your Linux distribution.
Or go for the official Qt for Python bindings https://doc.qt.io/qtforpython/
Cheers,
_
Re: Load a html file: No name 'QtWebEngineWidgets' in module 'PyQt5'
Quote:
Originally Posted by
anda_skoa
Maybe it is packaged as a separate module/package?
When I run "pip search" here on my system I can see a package called "PyQtWebEngine"
Maybe you need that one as well.
Alternatively you could try installing the respective packages of your Linux distribution.
Or go for the official Qt for Python bindings
https://doc.qt.io/qtforpython/
Cheers,
_
I had to use "pip3 install" instead of "pip install".
Thanks
M