[Python-modules-team] Bug#589592: _numpyconfig.h is version specific.

David Ham David.Ham at imperial.ac.uk
Wed Jul 21 09:46:01 UTC 2010


Thanks Ondrej, on closer inspection I think you are correct.

The bug is somewhat different. _numpyconfig.h is different for python 
2.5 and python 2.6 . It is therefore not present in

/usr/share/pyshared/numpy/core/include/numpy/

It is, however, present in:

/usr/lib/pymodules/python2.6/numpy/core/include/numpy/
/usr/lib/pymodules/python2.5/numpy/core/include/numpy/

Indeed the presence of this file is the only difference between those 
directories.

The problem occurs because of the following symlinks:

 > ls -ld /usr/include/python2.?/numpy
lrwxrwxrwx 1 root root 45 Jul 19 15:08 /usr/include/python2.5/numpy -> 
../../share/pyshared/numpy/core/include/numpy
lrwxrwxrwx 1 root root 45 Jul 19 15:08 /usr/include/python2.6/numpy -> 
../../share/pyshared/numpy/core/include/numpy

numpyconfig.h is therefore picked up from 
/usr/share/pyshared/numpy/core/include/numpy/ and upon looking in that 
directory, fails to find _numpyconfig.h

The correct fix would appear to be to make the following symlinks:

/usr/include/python2.5/numpy -> 
/usr/lib/pymodules/python2.5/numpy/core/include/numpy/
/usr/include/python2.6/numpy -> 
/usr/lib/pymodules/python2.6/numpy/core/include/numpy/

-- 
Dr David Ham
Applied Modelling and Computation Group,
Department of Earth Science and Engineering,
Imperial College London,

http://amcg.ese.ic.ac.uk/index.php?title=David_Ham





More information about the Python-modules-team mailing list