I am writing a QGIS plugin using SAGA by Processing. Is is possible to test whether SAGA is installed and which version is on?

For GDAL, it's OK with:


1 Answer 1


You might to want to look at some of the python code for SAGA algorithm providers, especially the module SagaUtils.py - that has a getSagaInstalledVersion() function, and a few functions for building the paths etc.

This is an example from the Python Console:-

>>> processing.algs.saga.SagaUtils.getSagaInstalledVersion()

Looking at the code, it's a wrapper around an external call to saga_cmd -v with retry logic

  • This is concise and works right !
    – Jean Hemmi
    Dec 6, 2015 at 22:07

Your Answer

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

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