Mac 10.5 Python libsvm 64 bit vs 32 bit

Posted by shadowsoul on Super User See other posts from Super User or by shadowsoul
Published on 2012-10-14T02:03:50Z Indexed on 2012/10/14 3:40 UTC
Read the original article Hit count: 510

Filed under:
|
|

I have a Mac 10.5 when I type "python" in terminal, it says

Enthought Python Distribution -- www.enthought.com Version: 7.3-2 (64-bit) Python 2.7.3 |EPD 7.3-2 (64-bit)| (default, Apr 12 2012, 11:14:05) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "credits", "demo" or "enthought" for more information.

then I go to my libsvm/python folder and type "make" which results in

make -C .. lib if [ "Darwin" = "Darwin" ]; then \ SHARED_LIB_FLAG="-dynamiclib -W1,-install_name,libsvm.so.2"; \ else \ SHARED_LIB_FLAG="-shared -W1,-soname,libsvm.so.2"; \ fi; \ g++ ${SHARED_LIB_FLAG} svm.o -o libsvm.so.2

when I try to do "from svmutil import *" I get the error:

OSError: dlopen(.../libsvm-3.12/python/../libsvm.so.2, 6): no suitable image found. Did find: .../libsvm-3.12/python/../libsvm.so.2: mach-o, but wrong architecture

when I do "lipo -info libsvm.so.2", I get:

Non-fat file: libsvm.so.2 is architecture: i386

So it looks like I'm running 64-bit python but libsvm ends up as a 32-bit program. Any way I can get it to compile as a 64-bit program?

© Super User or respective owner

Related posts about mac

Related posts about python