After downloading Matplotlib to use the Statist Pugin An error has occured while executing Python code:

RuntimeError: module compiled against API version 9 but this version of numpy is 6

Python version: 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]

QGIS version: 2.2.0-Valmiera Valmiera,

Later on the message is that statist is also not able to run. How to solve this problem?


It simply means that you do not have the correct numpy version for matplotlib

From your Python shell, you are on Mac OS X (Apple)

1) how did you install matplotlib ?
2) which is your version of QGIS: from KyngChaos, Homebrew, other ?
3) which version of Python do you use: Apple Python, Homebrew Python, ?

If you use the KyngChaos distribution, it use the Apple Python and his matplotlib module use his numpy module (version 1.8.0) (KyngChaos: Python modules)

Try in the shell (Terminal.app)

import numpy
print numpy.__version__
??? # -> 1.8.0 

If not, download/install the correct numpy version or use your installed version of numpy to install/compile matplotlib.


if you're using Mac OS X do this:

  1. http://www.kyngchaos.com/software/python
  2. download bumpy file
  3. install
  4. open QGIS
  • 1
    Welcome to GIS Stack Exchange :) Use the [edited x time ago] link above to see how I reformatted your answer so the list displays properly. Another improvement is to go beyond bare recipe, try and educate. Something more along the lines of "The error message indicates the wrong version of ___ is installed or can't be located. Try installing the latest from ___ from www.___. For example:...." – matt wilkie Oct 20 '14 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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