PyQt6 Raspberry Pi Web engine display maps

blair.oneill at magecontrol.com blair.oneill at magecontrol.com
Tue Aug 27 11:30:30 BST 2024


Hi,

TLDR; I have been trying to use folium map framework with PyQt6 and PyQt6-webengine on a raspberry pi 4 with pip without success. I am wondering if it is possible to display maps on a Pi with PyQt and if there is a recommended way.

I have been trying to display maps using folium and PyQt6 on a raspberry pi 4 model b rev 1.2 running raspberry Pi OS Bookworm (a Debian 12 derivative). I would like to use folium as it gives an interactive map instead of data analysis style map.

I have been trying to run this tutorial https://learndataanalysis.org/display-folium-maps-in-pyqt5/ but with pyqt6 instead of pyqt5. As I was not able to download pyqt5 as after running this command pip3 install pyqt5 --config-settings --confirm-license= --verbose it would get stuck building.

I can run this example successfully on the Pi, not in the virtual enviroment, after using this command sudo apt-get install python3-pyqt6.qtwebengine but I wish to run this in pip.

When I run apt list pyqt* I have the following installed.

pyqt-builder-doc/stable,stable 1.14.1+dfsg-1 all
pyqt5-dev-tools/stable 5.15.9+dfsg-1 arm64
pyqt5-dev-tools/stable 5.15.9+dfsg-1 armhf
pyqt5-dev/stable,stable 5.15.9+dfsg-1 all
pyqt5-examples/stable,stable 5.15.9+dfsg-1 all
pyqt5.qsci-dev/stable,stable 2.13.3+dfsg-3 all
pyqt5chart-dev/stable,stable 5.15.6+dfsg-1 all
pyqt6-charts-dev/stable,stable 6.4.0+dfsg-2 all
pyqt6-dev-tools/stable,stable 6.4.2-1 all
pyqt6-dev/stable,stable 6.4.2-1 all
pyqt6-examples/stable,stable 6.4.2-1 all
pyqt6-webengine-dev/stable,stable 6.4.0-1 all
pyqt6.qsci-dev/stable,stable 2.13.3+dfsg-3 all

The version installed with pip are listed below

PyQt6                             6.7.1
PyQt6-Qt6                    6.7.2
PyQt6_sip                     13.8.0
PyQt6-WebEngine     6.7.0

When I try to run this example in my pip virtual environment using pyqt6 and PyQt6-WebEngine both download with pip successfully, I receive the following error message.

ImportError: libwebp.so.6: cannot open shared object file: No such file or directory

After reading the mailing list archives I found the same error which was an OS compatibility issue with qt
https://www.riverbankcomputing.com/pipermail/pyqt/2024-July/045954.html

After checking the QT compatibility page I can see that Debian 11.6 on arm and raspberry pi 4 with Yocto 4.3 are supported but Pi OSbookworm isn't supported.

https://doc.qt.io/qt-6/supported-platforms.html

When I try to install PyQt6 version 6.4.0 in my virtual environment with pip I get the following error.

pyproject.toml: line 7: using '[tool.sip.metadata]' to specify the project metadata is deprecated and will be removed in SIP v7.0.0, use '[project]' instead Querying qmake about your Qt installation...

Therefore, is there anything I am missing or is it not possible to use pyqt6 webengine on a raspberry pi with Pi OS with pip and if so, has anyone been able to implement a map into a pyqt application on a Pi in pip.

Thank you in advance ,

Blair
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20240827/4e44eb80/attachment.htm>


More information about the PyQt mailing list