When compiling sip with the -arch x86_64 option, I got the following error.
prosseek: siplib smcho $ python -c 'import sip; print sip '
Traceback (most recent call last):
File "", line 1, in
ImportError: dlopen (./ sip.so, 2): no suitable image found. Did find:
./sip.so: mach-o, but wrong architecture
I found that prebuilt Mac OS X python (snow leopard) is universal and it does not get a 64-bit library. I assume that it works in 32-bit mode.
file / usr / bin / python
/ usr / bin / python: Mach-O universal binary with 3 architectures
/ usr / bin / python (for architecture x86_64): Mach-O 64-bit executable x86_64
/ usr / bin / python (for architecture i386): Mach-O executable i386
/ usr / bin / python (for architecture ppc7400): Mach-O executable ppc
prosseek: siplib smcho $ file sip.so
sip.so: Mach-O 64-bit bundle x86_64
How can I get python to work in 64 bit mode? When I run the same code in Textmate, there is no problem. So, I think Textmate should work in 64 bit mode.
Added
- This link shows how to determine if python is 32-bit or 64-bit. And I checked that my python is 32 bit.
- This link shows how to make 32/64-bit python. But this does not work for me.
source share