I built libsvm on Mac OS X using Make.
$ tar xzfv libsvm-3.17.tar.gz $ cd libsvm-3.17 $ make
This created various libsvm executables:
$ ls COPYRIGHT heart_scale svm-predict.c svm-train.c tools FAQ.html java svm-scale svm.cpp windows Makefile matlab svm-scale.c svm.def Makefile.win python svm-toy svm.h README svm-predict svm-train svm.o
I am also related to this in /usr/local :
$ ls -la /usr/local/ ... svm -> /usr/local/libsvm-3.17/
And added Python bindings to my path:
import sys sys.path.append('/usr/local/svm/python')
But Python bindings cannot find the "LIBSVM" library:
$ python test.py Traceback (most recent call last): File "test.py", line 8, in <module> import svmutil File "/usr/local/svm/python/svmutil.py", line 5, in <module> from svm import * File "/usr/local/svm/python/svm.py", line 22, in <module> raise Exception('LIBSVM library not found.') Exception: LIBSVM library not found.
Can someone tell me how to set this up? In python readme for libsvm the only description
Installation ============ On Unix systems, type > make The interface needs only LIBSVM shared library, which is generated by the above command. We assume that the shared library is on the LIBSVM main directory or in the system path.
What am I missing?
source share