As python3 is getting standard more and more I wonder wether there is or will be support for python 3 in QGIS?
[GIS] Python 3 support in QGIS
python 3qgis
Related Solutions
Nope, one version of Python per release of ArcGIS. The reason for this is simple: most of the magic happens in a C extension (arcgisscripting). The C APIs change from version to version, and that DLL isn't going to play nice in other versions of Python.
However, every time the main Python.org site releases a security fix (2.6.X), those are binary compatible and can be installed.
pyrogerg, you can have several versions of Python on your Mac (Mac OS X's, Macports, python.org framework, etc.) and it will not mess with QGIS, or any of the other versions of Python (older, but still relevant, similar question). You can also switch between them, or call a specific-version interpreter in Terminal (e.g. /usr/bin/python2.5), and some folks have made it easier on themselves. In fact, your Mac has several versions of Python already installed. Check /usr/bin. There is 2.5, 2.6, and 2.7 installed with Lion.
Concerning whether a Python 3 install will affect QGIS... basically no. If you are using the KyngChaos.com QGIS installs, they are compiled against the most current version of Python on the stock Mac OS X version they are built for (2.7 for Lion). A Python 3 (or 2.5) interpreter will not be used for the QGIS's internal Python environment, only the one it was compiled against.
Modules installed for the Python-specific version (here for stock Lion)...
/Library/Python/2.7/site-packages
will be available in QGIS, but plugin-local packages or modules of the same name will be loaded before them, as the plugin location paths (e.g. ~/.qgis/python/plugins/
) precede site-packages on sys.path.
Things change if you want to compile QGIS yourself (to use latest master branch from github.com repository). Then you need to be specific when choosing the version of Python for which to build the app. Python 3 is not recommended at this time. See Mac section #5 of INSTALL.
Concerning the GUI toolkit used when building PyQGIS plugins, it is PyQt (not Tcl/Tk), which is a Python binding for Nokia's Qt C++ GUI toolkit, which is what QGIS is built with. The KyngChaos.com QGIS.apps are bundled with most of the Qt frameworks they were compiled against. See:
/Applications/QGIS.app/Contents/Frameworks <-- 'Show Package Contents' of app
This means that you can also have different versions of Qt installed on your Mac as well, without affecting QGIS's build. Rarely there are issues with plugins 'seeing' two Qt installs and not knowing which to use, but it doesn't mean the plugin will crash.
If you are curious about building the current master branch of QGIS, and have a build environment setup as per INSTALL, try out this no frills script for automating the build.
Have fun learning Python. Certainly nothing wrong with learning 2.x and then move to 3.x. There are many, many apps, modules and plugins out there written with 2.x. If you are looking for a good IDE to learn Python, especially PyQt, try Eric4 or 5. It is actually built from PyQt as well.
Best Answer
Python 3.6 has landed in QGIS 2.99: