Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: cannot import name murmurhash3_32

I am trying to use the sklearn.qda package in python. I have installed it successfully but when Itry to import it I get the error message below. Can anybody tell me what should I do to fix this?

In [3]: from sklearn.qda import QDA
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-7d7abf937d66> in <module>()
----> 1 from sklearn.qda import QDA

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/qda.py in <module>()
     12 
     13 from .base import BaseEstimator, ClassifierMixin
---> 14 from .utils.fixes import unique
     15 from .utils import check_arrays, array2d
     16 

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/utils/__init__.py in <module>()
      7 import warnings
      8 
----> 9 from .murmurhash import murmurhash3_32
     10 from .validation import (as_float_array, check_arrays, safe_asarray,
     11                          assert_all_finite, array2d, atleast2d_or_csc,

ImportError: cannot import name murmurhash3_32
like image 584
Jorge Avatar asked Jul 28 '14 23:07

Jorge


3 Answers

I had the same problem, I run:

sudo pip install -U scikit-learn

and now everything is working fine

like image 167
jac Avatar answered Oct 21 '22 15:10

jac


I started a new shell and this problem went away

like image 3
kilojoules Avatar answered Oct 21 '22 14:10

kilojoules


I faced the similar situation of getting mumurhash error while installing sklearn.preprocessing library.

I upgraded numpy version from 1.13 to 1.15

using

pip install --upgrade numpy

After this, I was able to import the sklearn library.

like image 1
ram4189 Avatar answered Oct 21 '22 15:10

ram4189