I have a code that uses numpy and I want to compile it using Cython. I added the cimport directive:
import numpy as np
cimport numpy as np
I am on Windows 7, compiling using distutils with gcc (MinGW) as the compiler. It yields an error when I try to compile it. This is the error:
ssepMC.c:346:31: fatal error: numpy/arrayobject.h: No such file or directory
#include "numpy/arrayobject.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
I believe this error occurs because the compiler is trying to compile the numpy package. But this is an unnecessary step because a compiled version of numpy exists in Cython under
C:\Python27\Lib\site-packages\Cython\Includes\numpy\numpy.pxd
So the question is: How do I make the compiler use the compiled version of numpy?
Thanks in advance.