title: Libsvm python bindings: mach-o, but wrong architecture
body: <p>I am trying to install libsvm on my mac (OS-X 10.6.8). Libsvm installs fine for C++ (i can use svm-train, svm-predict binaries just fine). As per instructions I typed make in libsvm-3.12/python/ folder and got following output</p>
  
  <pre><code>&lt;i&gt;
  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
  &lt;/i&gt;
  </code></pre>
  
  <p>But when I try using it in python via "import svmutil" I get following error</p>
  
  <pre><code>&lt;i&gt; 
  Traceback (most recent call last):
    File "&lt;string&gt;", line 1, in &lt;module&gt;
    File "svmutil.py", line 3, in &lt;module&gt;
      from svm import *
    File "svm.py", line 19, in &lt;module&gt;
      '../libsvm.so.2'))
    File "/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/ctypes/__init__.py", line 353, in __init__
      self._handle = _dlopen(self._name, mode)
  OSError: dlopen(../libsvm.so.2, 6): no suitable image found.  Did find:
      ../libsvm.so.2: mach-o, but wrong architecture
  &lt;/i&gt;
  </code></pre>
  
  <p>I don't know how to get around this error. I tried compiling with -m64 and -arch x86_64 flags for g++ as well (during "Make" process of libsvm) but I continue to get this error. Can someone please tell me how to get around this issue?</p>