In case you are wondering how to use the awesome LIBSVM package with the awesome PyCharm IDE, here is a brief guide:

LIBSVM documentation  mention you need to

  • Download  libsvm(version 3.2 at the time of this writing)
  • Extract the zip to a folder. By default, this libsvm-3.20
  • Go to your command prompt, within the extracted directory, libsvm-3.20/, type “make”. This will create a file called If this doesn’t work, google how to enable make command on Mac OS.
  • go to libsvm-3.20/python directory, type make. This will create 2 files: and

Now, within PyCharm, say that you have a folder called Project/code/ where your code is stored at this level. Copy and mentioned above to your Project/code/ directory and Copy file to your Project/ directory.

From Project/code/ python file you can import the svm library with

from svmutil import *

That’s it. You should be all set.