I am writing a plugin for QGIS 2.0, and I want to use the processing framework to call some functions.

When I open the Python Console inside QGIS, I am able to call it like this:

>>> import processing

And then, for instance:

>>> processing.alglist()

However, if I try to import it in my Python Plugin, it fails to find the processing include:

from qgis.core import *
from qgis.gui import *
import processing

I googled the problem and found these directives:

from processing.core.Processing import Processing
from processing.core.ProcessingConfig import Setting, ProcessingConfig

Unfortunately, it also does not work for me.

Does anybody know how to include the QGIS processing framework in a plugin, and how to call the algorithm (let us say for instance processing.runalg(...)?

I found many explanations on how to do it in the Python Console, but not outside QGIS.


1 Answer 1


Using exactly the same imports as in the Python console works; is just a problem of pydev, that doesn't recognize the libraries (I probably need to add a reference in the project somewhere)

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.