Search code examples
pythonpyqt5msys2qtwebengine

How to install PyQtWebEngine in MSYS2 (Windows 10)


Well, first of all i try to install PyQtWebEngine with pip:

pip install PyQtWebEngine

but it fails.

Then i downloaded the PyQtWebEngine source code from here.

After that, i install sip with pacman command:

pacman -S mingw-w64-x86_64-sip4

After that i cd to the source downloaded of PyQtWebEngine, and finally i run:

python configure.py --sip /c/msys64/mingw64/bin/sip.exe --qmake /c/msys64/mingw64/bin/qmake.exe from msys2 mingw64 console.

Output:

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.

I search for this error (Generating the C++ source for the QtWebEngine module... Error: Unable to create the C++ code.), and here has answer related to sip version.

So the Question is, how can i install PyQtWebEngine (PyQt 5.15.2) in MSYS2?

Note: I read in qt forum that is not possible, but i want this module to display some chat iframes in the main pyqt5 program.


Solution

  • I don't know the difference of PyQtWebEngine and PyQtWebKit, but this package, is only what i need.