本文介绍了Windows 7 64位libsvm和python错误:函数'svm_get_sv_indices'不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在Windows 7(64位)上工作.我已经安装了Python 2.7.3(32位版本)和libsvm-3.13.当我尝试启动导入svmutil的简单.py文件时,出现错误
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
provade.py是:
The provade.py is:
from svmutil import *
我已经将libsvm.dll文件复制到C:\ windows \ system32目录...
I've already copied libsvm.dll file into C:\windows\system32 directory...
有什么建议吗?谢谢.
推荐答案
这是一个错误. libsvm-3.13 DLL缺少三个功能.尝试 libsvm 3.14 或替代二进制文件.
It's a bug. The libsvm-3.13 DLL is missing three functions. Try libsvm 3.14 or alternative binaries.
这篇关于Windows 7 64位libsvm和python错误:函数'svm_get_sv_indices'不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!