[cairo] pycairo on OSX: "ImportError: no suitable image found"

Andrea Canciani ranma42 at gmail.com
Sun Nov 21 00:23:21 PST 2010


On Sun, Nov 21, 2010 at 2:43 AM, Ian York <iayork at iayork.com> wrote:
> I'm trying to install pycairo 1.8.10 on my macbook pro (2.66 GHz Intel Core 2 Duo running MacOS 10.6.5), and pycairo is getting installed but not in a usable way. I get this error message:
>
> ------------------------------------------------------
> ~ > /usr/bin/python
> Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
> [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import cairo
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/Library/Python/2.6/site-packages/cairo/__init__.py", line 1, in <module>
>    from _cairo import *
> ImportError: dlopen(/Library/Python/2.6/site-packages/cairo/_cairo.so, 2): no suitable image found.  Did find:
>        /Library/Python/2.6/site-packages/cairo/_cairo.so: mach-o, but wrong architecture

It looks like you have a 32-bits _cairo.so when python wants a 64 bits
one or vice versa.
You might want to try building a universal _cairo.so or just check
which architecture
it is built for right now and build the other one.

Andrea


More information about the cairo mailing list