长话短说我已经通过apt-get在我的pi上安装了PyQt5。除了QWebEngineView之外,一切似乎都能正常工作。出于某种原因,我收到了这条消息:
ImportError:我尝试导入时没有名为'PyQt5.QtWebEngineWidgets'的模块。
PyQt5版本:5.8.2
任何人都有任何想法?
提前感谢您的时间。
apt-cache search pyqt5
返回
pyqt5-dev - Development files for PyQt5
pyqt5-dev-tools - Development tools for PyQt5
pyqt5-doc - Documentation for PyQt5
pyqt5-examples - Examples and demos for PyQt5
pyqt5.qsci-dev - Development files for Python Qscintilla2 (Qt5)
python-dbus.mainloop.pyqt5 - D-Bus Support for PyQt5 with Python
python-dbus.mainloop.pyqt5-dbg - D-Bus Support for PyQt5 (debug extensions for Python)
python-pyqt5 - Python bindings for Qt5
python-pyqt5-dbg - Python bindings for Qt5 (debug extensions)
python-pyqt5.enginio - Python 2 bindings for Enginio library
python-pyqt5.enginio-dbg - Python 2 bindings for Enginio library (debug extension)
python-pyqt5.qtmultimedia - Python bindings for Qt5's Multimedia module
python-pyqt5.qtmultimedia-dbg - Python bindings for Qt5's Multimedia module (debug extensions)
python-pyqt5.qtopengl - Python bindings for Qt5's OpenGL module
python-pyqt5.qtopengl-dbg - Python bindings for Qt5's OpenGL module (debug extension)
python-pyqt5.qtpositioning - Python bindings for QtPositioning module
python-pyqt5.qtpositioning-dbg - Python bindings for QtPositioning module (debug extension)
python-pyqt5.qtquick - Python bindings for QtQuick module
python-pyqt5.qtquick-dbg - Python bindings for QtQuick module (debug extension)
python-pyqt5.qtsensors - Python bindings for QtSensors module
python-pyqt5.qtsensors-dbg - Python bindings for QtSensors module (debug extension)
python-pyqt5.qtserialport - Python bindings for QtSerialPort module
python-pyqt5.qtserialport-dbg - Python bindings for QtSerialPort module (debug extension)
python-pyqt5.qtsql - Python bindings for Qt5's SQL module
python-pyqt5.qtsql-dbg - Python bindings for Qt5's SQL module (debug extension)
python-pyqt5.qtsvg - Python bindings for Qt5's SVG module
python-pyqt5.qtsvg-dbg - Python bindings for Qt5's SVG module (debug extension)
python-pyqt5.qtwebkit - Python bindings for Qt5's WebKit module
python-pyqt5.qtwebkit-dbg - Python bindings for Qt5's WebKit module (debug extensions)
python-pyqt5.qtwebsockets - Python bindings for Qt5's WebSockets module
python-pyqt5.qtwebsockets-dbg - Python bindings for Qt5's WebSockets module (debug extension)
python-pyqt5.qtx11extras - Python bindings for QtX11Extras module
python-pyqt5.qtx11extras-dbg - Python bindings for QtX11Extras module (debug extension)
python-pyqt5.qtxmlpatterns - Python bindings for Qt5's XmlPatterns module
python-pyqt5.qtxmlpatterns-dbg - Python bindings for Qt5's XmlPatterns module (debug extension)
python3-dbus.mainloop.pyqt5 - D-Bus Support for PyQt5 with Python 3
python3-dbus.mainloop.pyqt5-dbg - D-Bus Support for PyQt5 (debug extensions for Python 3)
python3-pyqt5 - Python 3 bindings for Qt5
python3-pyqt5-dbg - Python 3 bindings for Qt5 (debug extensions)
python3-pyqt5.enginio - Python 3 bindings for Enginio library
python3-pyqt5.enginio-dbg - Python 3 bindings for Enginio library (debug extension)
python3-pyqt5.qsci - Python 3 bindings for QScintilla 2 with Qt 5
python3-pyqt5.qsci-dbg - Python 3 bindings for QScintilla 2 (Qt 5 debug extensions)
python3-pyqt5.qtmultimedia - Python 3 bindings for Qt5's Multimedia module
python3-pyqt5.qtmultimedia-dbg - Python 3 bindings for Qt5's Multimedia module (debug extensions)
python3-pyqt5.qtopengl - Python 3 bindings for Qt5's OpenGL module
python3-pyqt5.qtopengl-dbg - Python 3 bindings for Qt5's OpenGL module (debug extension)
python3-pyqt5.qtpositioning - Python 3 bindings for QtPositioning module
python3-pyqt5.qtpositioning-dbg - Python 3 bindings for QtPositioning module (debug extension)
python3-pyqt5.qtquick - Python 3 bindings for QtQuick module
python3-pyqt5.qtquick-dbg - Python 3 bindings for QtQuick module (debug extension)
python3-pyqt5.qtsensors - Python 3 bindings for QtSensors module
python3-pyqt5.qtsensors-dbg - Python 3 bindings for QtSensors module (debug extension)
python3-pyqt5.qtserialport - Python 3 bindings for QtSerialPort module
python3-pyqt5.qtserialport-dbg - Python 3 bindings for QtSerialPort module (debug extension)
python3-pyqt5.qtsql - Python 3 bindings for Qt5's SQL module
python3-pyqt5.qtsql-dbg - Python 3 bindings for Qt5's SQL module (debug extension)
python3-pyqt5.qtsvg - Python 3 bindings for Qt5's SVG module
python3-pyqt5.qtsvg-dbg - Python 3 bindings for Qt5's SVG module (debug extension)
python3-pyqt5.qtwebkit - Python 3 bindings for Qt5's WebKit module
python3-pyqt5.qtwebkit-dbg - Python 3 bindings for Qt5's WebKit module (debug extensions)
python3-pyqt5.qtwebsockets - Python 3 bindings for Qt5's WebSockets module
python3-pyqt5.qtwebsockets-dbg - Python 3 bindings for Qt5's WebSockets module (debug extensions)
python3-pyqt5.qtx11extras - Python 3 bindings for QtX11Extras module
python3-pyqt5.qtx11extras-dbg - Python 3 bindings for QtX11Extras module (debug extension)
python3-pyqt5.qtxmlpatterns - Python 3 bindings for Qt5's XmlPatterns module
python3-pyqt5.qtxmlpatterns-dbg - Python 3 bindings for Qt5's XmlPatterns module (debug extension)
pyqt5 - Build of PyQt5 compiled for eglfs Qt5 and Python3 on Raspbian
答案 0 :(得分:0)
注意:由于编译器不兼容,使用早于v3.5的Python版本的Windows通常不提供QtWebEngineWidgets。
(Source)
答案 1 :(得分:0)
问题是他们忘了编译qtwebkit和-engine。 或者,您可以下载并自己编译,或者降级到较低版本。 对于Mac:pip3 install PyQt5 == 5.10(这是一个稳定的版本)。
答案 2 :(得分:-1)
QtWebEngine基于铬,这是一个很大的工具包。
,因此不适用于所有平台。
也许降级到基于QtWebKit的解决方案对您来说更可能。