如何在MSYS2中安装PyQtWebEngine (Windows10)

How to install PyQtWebEngine in MSYS2 (Windows 10)

嗯,首先我尝试用 pip 安装 PyQtWebEngine:

pip install PyQtWebEngine

但是失败了。

然后我下载了PyQtWebEngine源码from here

之后,我用 pacman 命令安装 sip:

pacman -S mingw-w64-x86_64-sip4

之后我cd到PyQtWebEngine下载的源码,最后我运行:

python configure.py --sip /c/msys64/mingw64/bin/sip.exe --qmake /c/msys64/mingw64/bin/qmake.exe 来自 msys2 mingw64 控制台。

输出:

Configuring PyQtWebEngine 5.15.2...
The PyQtWebEngine .sip files will be installed in
C:/msys64/mingw64/lib/python3.8/site-packages/PyQt5/bindings.
PyQtWebEngine will be installed in
C:/msys64/mingw64/lib/python3.8/site-packages/PyQt5.
PyQt 5.15.4 is being used.
Qt 5.15.2 is being used.
sip 4.19.25 is being used.
The sip executable is C:/msys64/mingw64/bin/sip.exe.
The PEP 484 stubs will be installed in
C:/msys64/mingw64/lib/python3.8/site-packages/PyQt5.
The QScintilla API file will be installed in
C:/msys64/mingw64/share/qt5/qsci/api/python.
Generating the C++ source for the QtWebEngine module...
Error: Unable to create the C++ code.

我搜索此错误(正在为 QtWebEngine 模块生成 C++ 源... 错误:无法创建 C++ 代码。), 有与 sip 版本相关的答案。

所以问题是,我如何在 MSYS2 中安装 PyQtWebEngine (PyQt 5.15.2)?

注意:我在 qt 论坛上看到这是不可能的,但我希望这个模块在 pyqt5 主程序中显示一些聊天 iframe。

我不知道 PyQtWebEngine 和 PyQtWebKit 的区别,但是this package,正是我需要的。