where is python.h? / NumPy installation

M

martino

Hi, I am trying to install NumPy (v23.8) onder Macosx (panther
version). Python (v2.3) is bundled into panther and I installed the
IDE on top of that. After having untarred the source distribution in
the desktop directory and typed
python setup.py install

as recommended in the attached documentation, I get:

running install
running build
running build_py
running build_ext
building '_numpy' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
-mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -I/System/Library/Frameworks/vecLib.framework/Headers
-IInclude -IPackages/FFT/Include -IPackages/RNG/Include
-I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3
-c Src/arrayobject.c -o
build/temp.darwin-7.8.0-Power_Macintosh-2.3/Src/arrayobject.o
Src/arrayobject.c:18:20: Python.h: No such file or directory
In file included from Src/arrayobject.c:26:
Include/Numeric/arrayobject.h:24: parse error before '*' token
Include/Numeric/arrayobject.h:24: warning: type defaults to `int' in
declaration of `PyArray_GetItemFunc'
Include/Numeric/arrayobject.h:24: warning: data definition has no type
or storage class
Include/Numeric/arrayobject.h:25: parse error before '*' token
Include/Numeric/arrayobject.h:25: warning: function declaration isn't
a prototype

+ zilions of error messages that probably stem from this first error
(i.e. not finding this Python.h file). Now I have looked everywhere
else on the hard drive and Python.h is nowhere to be seen. Should I
install something else before attempting to install NumPy (but what?).
Thanks a lot.

Martino
 
R

Robert Kern

martino said:
Hi, I am trying to install NumPy (v23.8) onder Macosx (panther
version). Python (v2.3) is bundled into panther and I installed the
IDE on top of that. After having untarred the source distribution in
the desktop directory and typed




as recommended in the attached documentation, I get:

running install
running build
running build_py
running build_ext
building '_numpy' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
-mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -I/System/Library/Frameworks/vecLib.framework/Headers
-IInclude -IPackages/FFT/Include -IPackages/RNG/Include
-I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3
-c Src/arrayobject.c -o
build/temp.darwin-7.8.0-Power_Macintosh-2.3/Src/arrayobject.o
Src/arrayobject.c:18:20: Python.h: No such file or directory
In file included from Src/arrayobject.c:26:
Include/Numeric/arrayobject.h:24: parse error before '*' token
Include/Numeric/arrayobject.h:24: warning: type defaults to `int' in
declaration of `PyArray_GetItemFunc'
Include/Numeric/arrayobject.h:24: warning: data definition has no type
or storage class
Include/Numeric/arrayobject.h:25: parse error before '*' token
Include/Numeric/arrayobject.h:25: warning: function declaration isn't
a prototype

+ zilions of error messages that probably stem from this first error
(i.e. not finding this Python.h file). Now I have looked everywhere
else on the hard drive and Python.h is nowhere to be seen. Should I
install something else before attempting to install NumPy (but what?).
Thanks a lot.

It *should* be
/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h

In the meantime, you can snag a pre-built Numeric from

http://pythonmac.org/packages/

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
M

martino

It *should* be
/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h

In the meantime, you can snag a pre-built Numeric from

http://pythonmac.org/packages/

It was not there to start with and by trying to install xcode from
apple's developpers site, I ended up screwing the pre-installed
version of python. So, I reinstalled a new build of python (2.4.1)
found on python.org (which put the coveted Python.h at the right place
and also the IDE) and then the pre-built of Numeric you just
mentionned and it now seems to work, so thanks a lot for the tip.

The original problem must stem from my installing panther over jaguar
in my machine, something must have gone wrong then.

Thanks again

Martino
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top