Cython dynamic library problem

Tommy Grav tgrav at
Thu Sep 18 16:47:30 CEST 2008

I am trying to learn how to use cython, and while I am following the  
mailing list I didn't feel like this question was totally appropriate  
for its audience
so I am trying here first.

I am on a max os x 10.5.4 running

drtgrav% python
ActivePython (ActiveState Software Inc.) based on
Python 2.5.2 (r252:60911, Mar 27 2008, 17:40:23)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

I have a pure python file that I am wanting to try to speed up some,
so I ran the file through cython, compiled it with gcc and tried to
call it from a python file

 > cython integrations.pyx
 > gcc -arch ppc -shared -c -fPIC -I/usr/include/python2.5  
integration.c -o
 > python
Traceback (most recent call last):
   File "", line 1, in <module>
     from astroPyX import pyx_integration
ImportError: dlopen(/Users/drtgrav/Work/myCode/Python/astroPyX/, 2): no suitable image found.  Did find:
	/Users/drtgrav/Work/myCode/Python/astroPyX/ can't  

where is

from astroPyX import pyx_integration


Does anyone know what the ImportError means and how to correct it?


More information about the Python-list mailing list