[Numpy-discussion] Where is arrayobject.h?

Neal Becker ndbecker2@gmail....
Tue Feb 21 12:26:17 CST 2012


What is the correct way to find the installed location of arrayobject.h?

On fedora, I had been using:
(via scons):

import distutils.sysconfig
PYTHONINC = distutils.sysconfig.get_python_inc()
PYTHONLIB = distutils.sysconfig.get_python_lib(1)

NUMPYINC = PYTHONLIB + '/numpy/core/include'

But on ubuntu, this fails.  It seems numpy was installed into 
/usr/local/lib/..., while PYTHONLIB expands to /usr/lib/python2.7/dist-packages.

Is there a universal method?



More information about the NumPy-Discussion mailing list