My QGIS does not recognize the recently installed python 2.7 on my mac osx 10.6.8. it still uses the python version 2.6 that is automatically installed by apple.

Opening qgis I always receive an error message telling me that the module importlib is not found and prevents the processing plugin from working.

How can I tell QGIS to use the installed python version 2.7 (In /Library/Python) instead of 2.6 (In /System/Library/Python)?

QGIS was installed from Dakota cartography nightly builds.

This is different from OS X Python vs QGIS Python as it does not ask for the reason for the problem but for a solution.

1 Answer 1


Sorry, but there is no simple solution. The versions of KyngChaos and Dakota use the Apple Python because it is the only way to be sure that the Python executable is in /usr/bin and the site-packages folder in /Library/Python/2.6/site-packages which is not the case with the others versions of Python.

What is your problem ? I use Python 2.6, 2.7.6 and 3.3 on Snow Leopard and I've never had problems using Python 2.6 with the Dakota's versions. The differences between the versions 2.7 and 2.6 are not so great and it is very easy to correct a plugin

For example in Python 2.7:

localePath = os.path.join(self.plugin_dir, 'i18n', 'realcentroid_{}.qm'.format(locale))

becomes in 2.6

localePath = os.path.join(self.plugin_dir, 'i18n', 'realcentroid_{0}.qm'.format(locale))

or dict comprehension:

d = {key: value for (key, value) in sequence}

becomes in 2.6:

d = dict((key, value) for (key, value) in sequence)
  • This is correct. The only solution to using a different Python, e.g. like from Homebrew, is to compile QGIS from source.
    – dakcarto
    Apr 4, 2014 at 18:14
  • thank you! there are some qgis-plugins that require modules which are not installed or integrated in python 2.6. these modules are available on the following link:kyngchaos.com/software/python. i have already installed psychopg2 successfully. the "processing"-plugin in QGIS works now perfectly. for the "statist"-plugin package Matplotlib is needed, which is only available for Lion or newer ones. I need this package for Snow Leopard. could anyone help me?
    – user28790
    Apr 8, 2014 at 12:24
  • install it as a normal Python module
    – gene
    Apr 8, 2014 at 15:31
  • or download it from the archives of KyngChaos
    – gene
    Apr 8, 2014 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.