[QGIS-Developer] QGIS Python Versions

Sergi Maspons - BGEO smaspons at bgeo.es
Wed Apr 9 07:55:16 PDT 2025


Hi devs,

I was wondering, is there a rule for which python version comes with 
each QGIS version?

It would be very useful for developing plugins, because I thought that 
from QGIS 3.34 onwards it comes with Python 3.12. But I installed 
qgis-ltr (3.40.5) on debian and saw that it came with Python 3.11.

Is there a minimum Python version that all plugins should use? We've 
been using new syntax added on newer versions of Python thinking that if 
the latest QGIS release comes with a certain Python version, I could 
assume that my plugin (if I only want to support the last two LTR) must 
work with that python version.

To summarize:
- In my Windows machine, I have both QGIS 3.40.4 & 3.34.15 and they both 
come with Python 3.12, therefore I assumed our plugin could use Python 
3.12 syntax and features.
- In a Debian machine, I installed QGIS 3.40.5 and it came with Python 
3.11.2.

It's not the end of the world for our plugin, because the most 
significant change we made was the usage of `match`, which was 
introduced in Python 3.10. But still, I don't really know if some user 
might have the latest release still with Python 3.9.

That's why I'm asking, what guidelines should I follow?

Thank you very much!

--

Maspi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250409/2fd62701/attachment.htm>


More information about the QGIS-Developer mailing list