2

I am new to Python. I wanted to use svm for my project. I was using libsvm 3.12 but when i do ..

from svm import * 

then i get the following error :

Traceback (most recent call last):

  File "C:/Python27/main.py", line 31, in 
    from svm import *
  File "C:/Python27\svm.py", line 12, in 
    libsvm = CDLL(find_library('libsvm'))
  File "C:\Python27\lib\ctypes\__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)

WindowsError: [Error 193] %1 is not a valid Win32 application

What should I do?

The libsvm README file suggested that I copy libsvm.dll into the system32 folder, which I did .. but still I am getting the error. I am using 64 bit Python. Maybe that is causing the problem?

1 Answer 1

5

I just had the same issue.

As Velociraptors posted in VLC Python Bindings -- Error 193:

I'm going to guess that the problem is trying to load a 32-bit DLL from a 64-bit process. You may be able to fix it by using a 32-bit Python build.

We solved the issue by downloading libSVM for python from http://www.lfd.uci.edu/~gohlke/pythonlibs/#libsvm

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.