How to run easy.py of libsvm in window?

Cassie picture Cassie · Sep 1, 2011 · Viewed 8.6k times · Source

I am new to the libsvm and sorry for some silly questions. I am trying to run easy.py but have problems to do so. I have

  1. downloaded the libsvm-3.1 package and extract it into C:\User\Cassie\libsvm
  2. Install Python and it created a folder at C:/Python27
  3. Download gp443win32.zip and extract it to a folder gnuplot at Download folder. Make a copy of gnuplot.exe and paste it to C:\User\Cassie\libsvm3-1\libsvm3-1\tools
  4. invoke cmd at Window 7 and typed "easy.py myfile.txt". But an error message showed

"Traceback (most recent call last): File "C:\User\Cassie\libsvm-3.1\libsvm-3.1\tools\easy.py", line 31, in assert os.path.exists(gnuplot_exe),"gnuplot executable not found" AssertionError: gnuplot executable not found"

Questions:

  1. Did I install the wrong gnuplot package?
  2. Did I move the wrong application ? gnuplot.exe
  3. Did I need to configure some path or envinroment to make the cmd find gnuplot.exe ?
  4. Did I type the wrong command to make easy.py run ?
  5. Do I have to label the training file first ?

There are much information at libsvm and I was really confused. Any experience with this issue is welcome. Thank you all very much,

Answer

machine_learning picture machine_learning · Sep 2, 2011

It looks like a "path problem". So open easy.py in text editor and go the line 25 which will look something like "gnuplot_exe = r"c:\tmp\Desktop\gnuplot\bin\pgnuplot.exe".

so you need to put the exact path of gnuplot stored , for example for me it was "gnuplot_exe = r"c:\Documents and Settings\Desktop\gnuplot\binary\pgnuplot.exe".

I Hope this will help you!!!