Install Libsvm Windows 7

Posted on -
Install Libsvm Windows 7 Rating: 3,5/5 1686 reviews
  1. Installing Libsvm Windows 7

Weka 64-bit (Waikato Environment for Knowledge Analysis) is a popular suite of machine learning software written in Java.Weka is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from your own Java code. The app contains tools for data pre-processing, classification, regression, clustering, association rules. Windows 7 (32 bit) I have not yet been able to successfully install the above classifier (a)I have gone to the windows environment variables and added the path C: Users/Stan wekafiles packages LibSVM lib libsvm.jar (b) I have edited RunWeka.ini to include the path. How do I install libsvm for python on Windows 7? Would like to know how to install libsvm for python under windows 7? I downloaded the livsvm zip, but I don't understand the instructions included. I have placed the libsvm.dll in my c: windows system32 directory, but when I try import svmutil or fro.

Active3 years, 3 months ago

Would like to know how to install libsvm for python under windows 7?

I downloaded the livsvm zip, but I don't understand the instructions included. I have placed the libsvm.dll in my c:windowssystem32 directory, but when I try

or

I get

Fred Foo
291k60 gold badges616 silver badges747 bronze badges
SuperdooperheroSuperdooperhero
2,47014 gold badges48 silver badges91 bronze badges

5 Answers

I think there's no need to place the dll in the C:windowssystem32 directory unless you're using old versions of Windows (XP and older).

Make sure that:

  • You launch your python test script containing from svmutil import * inside the libsvmpython directory
  • You still have a copy of the libsvm dll in the libsvmwindows directory (if you moved it to C:windowssystem32, put a copy back in the libsvmwindows directory)

This works on my computer.

alestanisalestanis
18.3k4 gold badges39 silver badges64 bronze badges

SOLVED:
1. Navigate to http://www.lfd.uci.edu/~gohlke/pythonlibs/#libsvm
2. Download the .whl file of libsvm corresponding to your OS.
3. Open command prompt and navigate to that folder containing the downloaded .whl file.
4. Type the following command in command prompt-
pip install libsvm-3.20-cp27-none-win32.whl

NOTE: Type name of your .whl file after pip install

Vinod Kumar ChauhanVinod Kumar Chauhan

The best way I found to install libSVM on Windows, alongside other Python libraries, is to use unofficial Windows binaries, here:

This page provides 32- and 64-bit Windows binaries of many scientific open-source extension packages for the official CPython distribution of the Python programming language.

Most binaries are built from source code found on PyPI or in the projects public revision control systems. Source code changes, if any, have been submitted to the project maintainers or are included in the packages.

Many binaries depend on Numpy-MKL 1.8 and/or the Microsoft Visual C++ 2008 (64 bit or 32 bit, for CPython 2.6 to 3.2) or Visual C++ 2010 (64 bit or 32 bit, for CPython 3.3 and 3.4) redistributable packages.

vipvip

I had a bunch of problems with this too on Windows 7 and libsvm 3.18, and none of the solutions above worked. It just couldn't find or didn't like the ../windows/libsvm.dll file no matter what file path gymnastics I tried. I was also running into 32-bit vs. 64-bit incompatibilities (my python is 64 bit).

Installing Libsvm Windows 7

I bracing myself for the pain of trying to recompile from visual studio, but this ended up being unnecessary. What ended up working for me was simply installing scikit-learn, which has libsvm included and nicely wrapped inside (http://scikit-learn.org/stable/index.html).

If you're using the Anaconda distro, like I was, this is extremely painless. Simply type conda install scikit-learn at a command line.

You can then import sklearn.svm.libsvm as svm and call it like just like you would libsvm, if you wish to ignore the other aspects of scikit-learn. It just works.

Little Bobby Tables
2,2892 gold badges17 silver badges32 bronze badges
LibsvmInstall Libsvm Windows 7
eculeuseculeus

I know you asked this question 1 year ago, but I'd still like to post my solution, in case other people may benefit.

  1. Put libsvm to any place. Mine in C:Python27Libsite-packageslibsvm-3.17

  2. Set PYTHONPATH in windows environment.Go to System Properties -> Advanced -> Environment variables.
    Add new variable, named PYTHONPATH, set value to C:Python27Libsite-packageslibsvm-3.17python.

JunboJunbo

Not the answer you're looking for? Browse other questions tagged pythonwindowslibsvm or ask your own question.