Hi,

I don't know what's wrong, but when I had similar problems, switching to Python 3.12 solved them for me.

Cheers,
Björn

On 21.07.2025 16:58, Alessandro Pasotti via QGIS-Developer wrote:
Hi,

I am trying to build QGIS with QT6 on Ubuntu (tried 24.10 and 25.04),
it builds without errors but when I run it, the following error
appears:

Couldn't load PyQGIS.
Python support will be disabled.

Traceback (most recent call last):
  File "", line 1, in
  File
"/home/ale/dev/QGIS/build/Desktop_QT6-Debug/output/python/qgis/gui/__init__.py",
line 25, in
    from qgis._gui import *
RuntimeError: qgis._gui cannot import type '���A� ' from
PyQt6.QtCore

Python version:
3.13.3 (main, Jun 16 2025, 18:15:32) [GCC 14.2.0]

QGIS version:
3.99.0-Master 'Master', e717e3cd2b9

Python path:
['/home/ale/dev/QGIS/build/Desktop_QT6-Debug/output/python',
'/home/ale/.local/share/QGIS/QGIS3/profiles/default/python',
'/home/ale/.local/share/QGIS/QGIS3/profiles/default/python/plugins',
'/home/ale/dev/QGIS/build/Desktop_QT6-Debug/output/python/plugins',
'/home/ale/dev/gdal/desktop-install/local/lib/python3.13/dist-packages',
'/home/ale/dev/gdal/autotest/pymod', '/usr/lib/python313.zip',
'/usr/lib/python3.13', '/usr/lib/python3.13/lib-dynload',
'/usr/local/lib/python3.13/dist-packages',
'/usr/lib/python3/dist-packages']

I checked the QGIS/build/Desktop_QT6-Debug/output/python/qgis content
and it looks legit.

PyQt6 installation also looks ok, importing core works ok, only gui
does not work.

Any idea about what's going wrong?

--

Alessandro Pasotti
QCooperative:  www.qcooperative.net [1]
ItOpen:   www.itopen.it [2]

Links:
------
[1] https://www.qcooperative.net
[2] http://www.itopen.it

_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to