I trying to use svm through scikit-learnkit for python. But I am continually getting following errors.
> from sklearn import svm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib64/python2.7/site-packages/sklearn/svm/__init__.py", line 13, in
<module>
from .classes import SVC, NuSVC, SVR, NuSVR, OneClassSVM, LinearSVC
File "/usr/local/lib64/python2.7/site-packages/sklearn/svm/classes.py", line 1, in <module>
from .base import BaseLibLinear, BaseSVC, BaseLibSVM
File "/usr/local/lib64/python2.7/site-packages/sklearn/svm/base.py", line 6, in <module>
from . import libsvm, liblinear
ImportError: cannot import name libsvm
I have checked /usr/local/lib64/python2.7/site-packages/sklearn/svm/libsvm.so is present
Related
Traceback (most recent call last):
File "tools/create_dictionary.py", line 7, in <module>
from dataset import Dictionary
File "/home/supermicro/xswork/xsvqa/dataset.py", line 6, in <module>
import utils
File "/home/supermicro/xswork/xsvqa/utils.py", line 7, in <module>
import torch
ImportError: No module named torch
Traceback (most recent call last):
File "tools/compute_softscore.py", line 10, in <module>
from dataset import Dictionary
File "/home/supermicro/xswork/xsvqa/dataset.py", line 6, in <module>
import utils
File "/home/supermicro/xswork/xsvqa/utils.py", line 7, in <module>
import torch
ImportError: No module named torch
/home/supermicro/xswork/ENV/local/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "tools/detection_features_converter.py", line 22, in <module>
import utils
File "/home/supermicro/xswork/xsvqa/utils.py", line 7, in <module>
import torch
ImportError: No module named torch
I have a requirement of using the carrot python library. This is the code code.
from carrot.connection import BrokerConnection
from carrot.messaging import Consumer
Both the lines are throwing an ImportError exception.
The exception traceback is..
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/.virtualenvs/stack/lib/python2.7/site-packages/carrot/connection.py", line 14, in <module>
from carrot.backends import get_backend_cls
File "/.virtualenvs/stack/lib/python2.7/site packages/carrot/backends/__init__.py", line 8, in <module>
from carrot.utils import rpartition
File "/.virtualenvs/stack/lib/python2.7/site-packages/carrot/utils.py", line 1, in <module>
from uuid import UUID, uuid4, _uuid_generate_random
ImportError: cannot import name _uuid_generate_random
Im running this on Python 2.7.13 with the latest version of carrot and uuid. I have also tried upgrading uuid.
where do i find the solution to this ?
is in the missing dependencies or in the script?
Traceback (most recent call last):
File "2.py", line 14, in <module>
from pycall.callfile import *
File "/usr/lib/python2.6/site-packages/pycall-2.3.0-py2.6.egg/pycall/__init__.py", line 8, in <module>
from .callfile import CallFile
File "/usr/lib/python2.6/site-packages/pycall-2.3.0-py2.6.egg/pycall/callfile.py", line 11, in <module>
from path import path
ImportError: cannot import name path
I followed the exact documentation in here
but after that importing produces the following error. I am using windows 7 and python 2.7. I have already installed scipy and matplotlib.
The error that I get is as follows:
>>> import pybrain
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pybrain\__init__.py", line 1, in <module>
from pybrain.structure.__init__ import *
File "pybrain\structure\__init__.py", line 2, in <module>
from pybrain.structure.modules.__init__ import *
File "pybrain\structure\modules\__init__.py", line 2, in <module>
from pybrain.structure.modules.gate import GateLayer, DoubleGateLayer, Multi
plicationLayer, SwitchLayer
File "pybrain\structure\modules\gate.py", line 10, in <module>
from pybrain.tools.functions import sigmoid, sigmoidPrime
File "pybrain\tools\functions.py", line 4, in <module>
from scipy.linalg import inv, det, svd, logm, expm2
File "C:\Python27\lib\site-packages\scipy\linalg\__init__.py", line 174, in <m
odule>
from .misc import *
File "C:\Python27\lib\site-packages\scipy\linalg\misc.py", line 5, in <module>
from .blas import get_blas_funcs
File "C:\Python27\lib\site-packages\scipy\linalg\blas.py", line 155, in <modul
e>
from scipy.linalg import _fblas
ImportError: DLL load failed: The specified module could not be found.
For scipy requires installing numpy+mkl. You can install this lib from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
I am getting below error when trying to import the urllib2:
>>> import urllib2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/urllib2.py", line 94, in <module>
import httplib
File "/usr/lib64/python2.7/httplib.py", line 69, in <module>
from array import array
ImportError: cannot import name array`
Any thoughts on it?
It seems you have a python program named "array.py" in you present working directory. If yes rename that python program or move it to some other directory.