Use VERSIONER_PYTHON_PREFER_32_BIT=yes in Snow Leopard


In python, you can use ctype (dl is deprecated now) to load dynamic link library. In 10.4 and 10.5 it may work fine, but it may occur errors in 10.6, such as

/Library/Frameworks/dummy.framework/dummy: no matching architecture in universal wrapper

Since the python in Snow Leopard is 64-bit in default, for those libraries which does not support 64-bit. You can test your library by

% file /Library/Frameworks/dummy.framework/Versions/Current/dummy

If you library is i386 only, you may need to handle it in this way.

% export VERSIONER_PYTHON_PREFER_32_BIT=yes
% python your_script.py

ericsk has also mentioned this for wxPython in his plurk

For more information, you can read the man page in your Snow Leopard.


Leave a Reply

Your email address will not be published. Required fields are marked *