0

I tried to install libsvm downloaded from here http://www.csie.ntu.edu.tw/~cjlin/libsvm/ I already do the stepped written in the README which is

Building Windows Binaries
=========================

Windows binaries are in the directory `windows'. To build them via
Visual C++, use the following steps:

1. Open a DOS command box (or Visual Studio Command Prompt) and change
to libsvm directory. If environment variables of VC++ have not been
set, type

"C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"

You may have to modify the above command according which version of
VC++ or where it is installed.

2. Type

nmake -f Makefile.win clean all

3. (optional) To build shared library libsvm.dll, type

nmake -f Makefile.win lib

I also copied the libsvm.dll to my windows32 folder.

I cant seem to find anything wrong but when I compiled a python code with "import svm" in it, I got the following error:

$ python analyze.py
Traceback (most recent call last):
  File "analyze.py", line 2, in <module>
    import baseline_classifier, naive_bayes_classifier, max_entropy_classifier, libsvm_classifier
  File "D:\twitter-sentiment-analyzer-master\libsvm_classifier.py", line 1, in <module>
    import svm
ImportError: No module named svm
1

1 Answer 1

1

Easy way to install:

Download libsvm's install binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/#libsvm You might want to install libsvm‑3.17.win‑amd64‑py2.7.exe or libsvm‑3.17.win32‑py2.7.exe depending upon you windows config

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.