Need help configuring pyrex for primes.pyx example

Skip Montanaro skip at
Fri Aug 2 05:35:16 CEST 2002

    [debl at whiplash Demos] python ../pyrexc primes.pyx 
    [debl at whiplash Demos] gcc -c -fPIC -I/usr/local/ActivePython-2.2/include/python2.2 primes.c
    [debl at whiplash Demos] gcc -shared primes.o -o
    [debl at whiplash Demos] 
    Segmentation fault (core dumped)
    [debl at whiplash Demos] 

A shared object file such as is not going to be executable all by
itself.  Instead, try running the python interpreter and executing

    import primes

at the prompt.  You can then execute


to see what symbols are available in the primes module (probably something
like findprime or isprime functions).

Skip Montanaro
skip at

More information about the Python-list mailing list