-1

我使用 conda 安装,终端给我一个关于 GPU 的错误,但我没有使用 GPU。


>>> import theano
>>> import numpy
>>> import matplotlib
>>> import sidekit

这会引发以下错误:

Import theano

WARNING (theano.sandbox.cuda): The cuda backend is deprecated and will be removed in the next release (v0.10).  Please switch to the gpuarray backend. You can get more information about how to switch at this URL:

 https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29

ERROR (theano.sandbox.cuda): nvcc compiler not found on $PATH. Check your nvcc installation and try again.
Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "/home/adit/miniconda3/lib/python3.5/site-packages/sidekit/__init__.py", line 166, in <module>
    from sidekit.libsvm import *

File "/home/adit/miniconda3/lib/python3.5/site-packages/sidekit/libsvm/__init__.py", line 37, in <module>
    from sidekit.libsvm.svm import *

File "/home/adit/miniconda3/lib/python3.5/site-packages/sidekit/libsvm/svm.py", line 324, in <module>
    fillprototype(libsvm.svm_get_sv_indices, None, [POINTER(svm_model), POINTER(c_int)])

File "/home/adit/miniconda3/lib/python3.5/ctypes/__init__.py", line 360, in __getattr__
    func = self.__getitem__(name)

File "/home/adit/miniconda3/lib/python3.5/ctypes/__init__.py", line 365, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/libsvm.so.3: undefined symbol: svm_get_sv_indices
4

1 回答 1

1

Theano 警告并不是您无法导入 Sidekit 的原因。

Sidekit 不会被导入,因为它找不到 libsvm 库文件,Sidekit 需要您手动安装。查看Sidekit 指南这个问题以获得解决方案。

于 2017-05-30T13:28:42.030 回答