[QGIS-Developer] Building QGIS with QT6 on Ubuntu: Python error at start
Werner Macho
werner.macho at gmail.com
Mon Jul 21 08:04:37 PDT 2025
Hi Alessandro,
Nice to see another one having the same problem.
On which linux distribution are you?
I am using debian testing - and despite having it installed again from
scratch I have the same problem (though nothing from qt5 installed the
second time).
Probably a problem in the debian package?
It was not urgent for me so I did not report it yet.
regards
Werner
On Mon, Jul 21, 2025 at 4:58 PM Alessandro Pasotti via QGIS-Developer <
qgis-developer at lists.osgeo.org> 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
> ItOpen: www.itopen.it
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250721/9ffd2d8d/attachment.htm>
More information about the QGIS-Developer
mailing list