[Pyrex] Building Pyrex module with Linux

Mike Wyatt mikejohnwyatt at gmail.com
Wed May 9 12:22:56 UTC 2007


Thanks!  That helps, but now I'm getting a new error.  I /think/ I need to
add the GCC include folder to my pythonpath, but I'm not sure how to do that
in Linux.  I haven't had any luck over the last 15 minutes or so, so I'll
work on it some more after work tonight.  If someone could confirm that that
would work, and/or tell me how to get/set my pythonpath in Linux, I'd be
very appreciative.

Thanks!

*** Excerpt from latest setup build ***
mwyatt at mwyatt-laptop:~/python$ python setup.py build
running build
running build_ext
building 'test' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes
-fPIC -I/usr/include/python2.5 -c test.c -o build/temp.linux-x86_64-2.5
/test.o
In file included from
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/include/syslimits.h:7,
                 from
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/include/limits.h:11,
                 from /usr/include/python2.5/Python.h:18,
                 from test.c:3:
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/include/limits.h:122:61: error: limits.h:
No such file or directory
In file included from test.c:3:
/usr/include/python2.5/Python.h:32:19: error: stdio.h: No such file or
directory
/usr/include/python2.5/Python.h:34:5: error: #error "Python.h requires that
stdio.h define NULL."
/usr/include/python2.5/Python.h:37:20: error: string.h: No such file or
directory
/usr/include/python2.5/Python.h:39:19: error: errno.h: No such file or
directory
/usr/include/python2.5/Python.h:41:20: error: stdlib.h: No such file or
directory
/usr/include/python2.5/Python.h:43:20: error: unistd.h: No such file or
directory
/usr/include/python2.5/Python.h:55:20: error: assert.h: No such file or
directory


On 5/8/07, Robert Kern <robert.kern at gmail.com> wrote:
>
> Mike Wyatt wrote:
> > I'd like to build the modules on my new Ubuntu box.  I made a trivial
> > little Pyrex script that I'm trying to build with distutils.  I copied
> > and modified Setup.py from the Demos folder.  I'm using Pyrex 0.9.5.1a
> > and whatever the default installation of GCC is for Ubuntu 7.04.
> >
> > When I try to run the setup script (i.e. "python setup.py build"), I get
> > a ton of errors.  Below you can see the content of my .pyx script, my
> > setup.py script, and the error messages I get when I attempt to build
> > setup.py.
> >
> > It looks like GCC can't find Python.h.  I'm not sure what to do about
> > that, though.  I'm pretty new to Linux, and I was hoping that this setup
> > script would help me avoid most of these kind of issues.
>
> Make sure you have the python2.5-dev package installed. It has the header
> files.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma
> that is made terrible by our own mad attempt to interpret it as though it
> had
> an underlying truth."
>   -- Umberto Eco
>
>
> _______________________________________________
> Pyrex mailing list
> Pyrex at lists.copyleft.no
> http://lists.copyleft.no/mailman/listinfo/pyrex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.copyleft.no/pipermail/pyrex/attachments/20070509/fa1226ac/attachment.html 


More information about the Pyrex mailing list