Problem encountered when installing stsci_python 2.9 at Mac
caiz wrote on Jan 20, 2010
Dear friends:
My computer is MacBook Pro snow leopard 2.6.
I have successfully installed IRAF2.14, stsdas 3.11, tables 3.11.
And I have installed python 2.5 and Pmw, num.. supporting softwares.
My C compiler is from xcode. Fortran compiler g77 is also available.
I try to install stsci_python 2.9 with every step strictly following the
official instruction:
(http://www.stsci.edu/resources/software_hardware/pyraf/stsci_python/Installation)
The instruction said:
" Extract the tar file:
% gunzip stsci_python_2.7.tar.gz
% tar -xvf stsci_python_2.7.tar
use gtar (gnu tar) on Solaris
% cd stsci_python_2.7
If you need numpy, install it:
% cd numpy-1.3.0
% unsetenv F77
% unsetenv F2C
% python setup.py install
% cd ..
Install the stsci_python package:
% python setup.py install
(optional) Install the stsci_python documentation:
% cd stscidocs
% python setup.py install "
But the last step cannot work. The error is the following:
I have worked this for nearly 10 hours and turn to several people's
help. But still cannot work. I really expect some one can give some
comments. Thank you very much!!
The error:
pywcs/src/pyutil.h:104: error: âNPY_NANâ undeclared (first use in this function)
pywcs/src/pyutil.h:104: error: (Each undeclared identifier is reported only once
pywcs/src/pyutil.h:104: error: for each function it appears in.)
In file included from pywcs/src/distortion_wrap.h:40,
from pywcs/src/distortion_wrap.c:39:
pywcs/src/pyutil.h:46:28: error: numpy/npy_math.h: No such file or directory
In file included from pywcs/src/distortion_wrap.h:40,
from pywcs/src/distortion_wrap.c:39:
pywcs/src/pyutil.h: In function âundefined2nanâ:
pywcs/src/pyutil.h:104: error: âNPY_NANâ undeclared (first use in this function)
pywcs/src/pyutil.h:104: error: (Each undeclared identifier is reported only once
pywcs/src/pyutil.h:104: error: for each function it appears in.)
In file included from pywcs/src/distortion_wrap.h:40,
from pywcs/src/distortion_wrap.c:39:
pywcs/src/pyutil.h:46:28: error: numpy/npy_math.h: No such file or directory
In file included from pywcs/src/distortion_wrap.h:40,
from pywcs/src/distortion_wrap.c:39:
pywcs/src/pyutil.h: In function âundefined2nanâ:
pywcs/src/pyutil.h:104: error: âNPY_NANâ undeclared (first use in this function)
pywcs/src/pyutil.h:104: error: (Each undeclared identifier is reported only once
pywcs/src/pyutil.h:104: error: for each function it appears in.)
lipo: can't open input file: /var/tmp//ccFOFHO7.out (No such file or directory)
My computer is MacBook Pro snow leopard 2.6.
I have successfully installed IRAF2.14, stsdas 3.11, tables 3.11.
And I have installed python 2.5 and Pmw, num.. supporting softwares.
My C compiler is from xcode. Fortran compiler g77 is also available.
I try to install stsci_python 2.9 with every step strictly following the
official instruction:
(http://www.stsci.edu/resources/software_hardware/pyraf/stsci_python/Installation)
The instruction said:
" Extract the tar file:
% gunzip stsci_python_2.7.tar.gz
% tar -xvf stsci_python_2.7.tar
use gtar (gnu tar) on Solaris
% cd stsci_python_2.7
If you need numpy, install it:
% cd numpy-1.3.0
% unsetenv F77
% unsetenv F2C
% python setup.py install
% cd ..
Install the stsci_python package:
% python setup.py install
(optional) Install the stsci_python documentation:
% cd stscidocs
% python setup.py install "
But the last step cannot work. The error is the following:
I have worked this for nearly 10 hours and turn to several people's
help. But still cannot work. I really expect some one can give some
comments. Thank you very much!!
The error:
pywcs/src/pyutil.h:104: error: âNPY_NANâ undeclared (first use in this function)
pywcs/src/pyutil.h:104: error: (Each undeclared identifier is reported only once
pywcs/src/pyutil.h:104: error: for each function it appears in.)
In file included from pywcs/src/distortion_wrap.h:40,
from pywcs/src/distortion_wrap.c:39:
pywcs/src/pyutil.h:46:28: error: numpy/npy_math.h: No such file or directory
In file included from pywcs/src/distortion_wrap.h:40,
from pywcs/src/distortion_wrap.c:39:
pywcs/src/pyutil.h: In function âundefined2nanâ:
pywcs/src/pyutil.h:104: error: âNPY_NANâ undeclared (first use in this function)
pywcs/src/pyutil.h:104: error: (Each undeclared identifier is reported only once
pywcs/src/pyutil.h:104: error: for each function it appears in.)
In file included from pywcs/src/distortion_wrap.h:40,
from pywcs/src/distortion_wrap.c:39:
pywcs/src/pyutil.h:46:28: error: numpy/npy_math.h: No such file or directory
In file included from pywcs/src/distortion_wrap.h:40,
from pywcs/src/distortion_wrap.c:39:
pywcs/src/pyutil.h: In function âundefined2nanâ:
pywcs/src/pyutil.h:104: error: âNPY_NANâ undeclared (first use in this function)
pywcs/src/pyutil.h:104: error: (Each undeclared identifier is reported only once
pywcs/src/pyutil.h:104: error: for each function it appears in.)
lipo: can't open input file: /var/tmp//ccFOFHO7.out (No such file or directory)
seamus1089 wrote on Jan 20, 2010
i think this problem arises because you have an old version of numpy. npy_math.h is new to numpy 1.3, and defines NPY_NAN
check your numpy version via
python -c "import numpy; print numpy.version.version"
if its an old version try updating. if not, see http://mail.scipy.org/pipermail/numpy-discussion/2009-July/043787.html, a similar mac specific bug might be causing you problems.
hope that helps
check your numpy version via
python -c "import numpy; print numpy.version.version"
if its an old version try updating. if not, see http://mail.scipy.org/pipermail/numpy-discussion/2009-July/043787.html, a similar mac specific bug might be causing you problems.
hope that helps
seamus1089 wrote on Jan 20, 2010
also make sure youre on python2.5
Last post on Jan 20, 2010