python - Cython: fatal error: 'numpy/arrayobject.h' file not found, using numpy -


i trying move ipython notebook code python. have error

fatal error: 'numpy/arrayobject.h' file not found #include "numpy/arrayobject.h" 

, though have included numpy in setup

my setup.py:

from distutils.core import setup, extension cython.build import cythonize import numpy  setup(     ext_modules=cythonize("trajectory.pyx"),     include_dirs=[numpy.get_include()] ) 

the trajectory.pyx file

cimport numpy np import  numpy np  

i running on osx, python 2.7.10

it gives me information before error, hope identifying issue: clang -fno-strict-aliasing -fno-common -dynamic -isysroot /applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.11.sdk -i/applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.11.sdk/system/library/frameworks/tk.framework/versions/8.5/headers -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -i/usr/local/include -i/usr/local/opt/openssl/include -i/usr/local/opt/sqlite/include -i/usr/local/cellar/python/2.7.10_2/frameworks/python.framework/versions/2.7/include/python2.7 -c trajectory.c -o build/temp.macosx-10.11-x86_64-2.7/trajectory.o

and when ran

import numpy numpy.get_include() 

i get:

'/usr/local/lib/python2.7/site-packages/numpy/core/include' 

and directory, /numpy/arrayobject.h there. don't know why said no such file


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -