Windows 7 64bit libsvm and python error: function 'svm_get_sv_indices' not foud

ε祈祈猫儿з 提交于 2019-12-31 05:49:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!