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

Ian York iayork at iayork.com
Sun Nov 21 06:31:08 PST 2010


On Nov 21, 2010, at 3:23 AM, Andrea Canciani wrote:
> 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.

Thanks -- how do I do that? I don't see an architecture option in the configuration/build.  

Ian


-- 
    Ian York   (iayork at iayork.com)  <http://www.iayork.com/>
 "-but as he was a York, I am rather inclined to suppose him a
  very respectable Man." -Jane Austen, The History of England



More information about the cairo mailing list