问题
i'm working on Windows 7 (64bit).I've installed Python 2.7.3 (32bit version) and libsvm-3.13. When I try to launch a simple .py file that import svmutil I get an error
C:\libsvm-3.13\python>python provade.py
Traceback (most recent call last):
File "provade.py", line 1, in <module>
from svmutil import *
File "C:\libsvm-3.13\python\svmutil.py", line 3, in <module>
from svm import *
File "C:\libsvm-3.13\python\svm.py", line 288, in <module>
fillprototype(libsvm.svm_get_sv_indices, None, [POINTER(svm_model), POINTER(c_int)])
File "C:\Python27\lib\ctypes\__init__.py", line 378, in __getattr__
func = self.__getitem__(name)
File "C:\Python27\lib\ctypes\__init__.py", line 383, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'svm_get_sv_indices' not found
The provade.py is:
from svmutil import *
I've already copied libsvm.dll file into C:\windows\system32 directory...
Any suggestions? thank you.
回答1:
It's a bug. The libsvm-3.13 DLL is missing three functions. Try libsvm 3.14 or alternative binaries.
来源:https://stackoverflow.com/questions/13725013/windows-7-64bit-libsvm-and-python-error-function-svm-get-sv-indices-not-foud