[SciPy-user] Numpy distutils failing to report ndarrayobject.h

Travis Oliphant oliphant at ee.byu.edu
Fri Mar 23 13:25:45 EDT 2007


Anand Patil wrote:

>Hi all,
>
>The following in a Pyrex extension module:
>
>cdef extern from "numpy/ndarrayobject.h":
>    void* PyArray_DATA(object obj)
>
>produces the following in C:
>
>#include "numpy/ndarrayobject.h".
>
>The numpy distutils apparently fail to compile the extension module 
>under win2k, Python 2.4:
>
>PyMC2/PyrexLazyFunction.c:15:33: numpy/ndarrayobject.h: No such file or directory
>PyMC2/PyrexLazyFunction.c: In function
>`__pyx_f_17PyrexLazyFunction_12LazyFunction_get_array_data':
>
>
>but it compiles fine on my machine, running OSX 10.4 and Python 2.5. 
>Unfortunately I can't experiment much because I don't have a Windows 
>machine available. Can anyone help me out with this?
>  
>

The include directory is not in the list of directories to search for 
the header files and so it is not being found.  I'm not sure what would 
cause this.  It's possible that the windows system doesn't have NumPy 
installed (or else the headers are not installed).  Or, it's possible 
that numpy.distutils is not adding the NumPy directory to the list of 
directories to search for header files.

I'm not sure why it's not adding the location of the NumPy headers to 
the compile line.

-Travis



>Thanks,
>Anand
>_______________________________________________
>SciPy-user mailing list
>SciPy-user at scipy.org
>http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
>  
>




More information about the SciPy-User mailing list