I'm running QGIS 3.28.8 on Windows 10, Python 3.9.5.

In the Python interpreter when I run

from qgis.core import QgsRasterCalculator

I receive the following error:

ImportError: cannot import name 'QgsRasterCalculator' from 'qgis.core'

Has QgsRasterCalculator moved?

1 Answer 1


The QgsRasterCalculator class is part of the analysis module:


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.