我安装了使用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
答案 0 :(得分:0)
Theano警告并不是您无法导入Sidekit的原因。
不会导入Sidekit,因为它找不到libsvm库文件,Sidekit要求您手动安装。 查看Sidekit guide和this问题以获得解决方案。