Brett Calcott wrote:
> Hi Daniel,
>
>
> 2009/6/16 Daniel Yarlett <[email protected]>:
>> ... SNIP ...
>> It looks like arrayobject.h is not being found, so do I need to modify
>> my setup.py file somehow? I'm afraid I'm not sure how to do this, so
>> any help would be greatly appreciated.
>
>
> This line in my .bashrc solves the same problem on my Mac
>
> export C_INCLUDE_PATH=/Library/Python/2.5/site-packages/numpy/core/include
>
> Or, I think you could add the same path to your definition of the
> Extension() in setup.py. I think you can do this:
>
> ext_modules = [Extension("neuralRoutines", ["neuralRoutines.pyx"],
> extra_compile_args=['-Ithe/path/you/want/here'],
> )]
>
> ... but I haven't checked it.
The usual way of doing this is
import numpy
...
setup(
...
ext_modules = [Extension(..., include_path=[numpy.get_include()])]
)
No need to alter include paths etc. then.
(It would be great if somebody could take the time to add this question
to the FAQ and/or the Cython/NumPy tutorial, it comes up a lot.)
--
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev