where is python.h? / NumPy installation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • martino

    #1

    where is python.h? / NumPy installation

    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
    [color=blue]
    >python setup.py install[/color]

    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.framewor k/Headers
    -IInclude -IPackages/FFT/Include -IPackages/RNG/Include
    -I/System/Library/Frameworks/Python.framewor k/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:1 8:20: Python.h: No such file or directory
    In file included from Src/arrayobject.c:2 6:
    Include/Numeric/arrayobject.h:2 4: parse error before '*' token
    Include/Numeric/arrayobject.h:2 4: warning: type defaults to `int' in
    declaration of `PyArray_GetIte mFunc'
    Include/Numeric/arrayobject.h:2 4: warning: data definition has no type
    or storage class
    Include/Numeric/arrayobject.h:2 5: parse error before '*' token
    Include/Numeric/arrayobject.h:2 5: 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
  • Robert Kern

    #2
    Re: where is python.h? / NumPy installation

    martino wrote:[color=blue]
    > 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
    >
    >[color=green]
    >>python setup.py install[/color]
    >
    >
    > 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.framewor k/Headers
    > -IInclude -IPackages/FFT/Include -IPackages/RNG/Include
    > -I/System/Library/Frameworks/Python.framewor k/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:1 8:20: Python.h: No such file or directory
    > In file included from Src/arrayobject.c:2 6:
    > Include/Numeric/arrayobject.h:2 4: parse error before '*' token
    > Include/Numeric/arrayobject.h:2 4: warning: type defaults to `int' in
    > declaration of `PyArray_GetIte mFunc'
    > Include/Numeric/arrayobject.h:2 4: warning: data definition has no type
    > or storage class
    > Include/Numeric/arrayobject.h:2 5: parse error before '*' token
    > Include/Numeric/arrayobject.h:2 5: 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.[/color]

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

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



    --
    Robert Kern
    rkern@ucsd.edu

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

    Comment

    • martino

      #3
      Re: where is python.h? / NumPy installation

      >[color=blue]
      > It *should* be
      > /System/Library/Frameworks/Python.framewor k/Versions/2.3/include/python2.3/Python.h
      >
      > In the meantime, you can snag a pre-built Numeric from
      >
      > http://pythonmac.org/packages/[/color]

      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

      Comment

      Working...