[Numpy-discussion] Where is arrayobject.h?
"V. Armando Solé"
sole@esrf...
Tue Feb 21 12:31:55 CST 2012
On 21/02/2012 19:26, Neal Becker wrote:
> 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?
>
>
I use:
import numpy
numpy.get_include()
If that is universal I cannot tell.
Armando
More information about the NumPy-Discussion
mailing list