2

I installed scikit-learn library in python using the command

pip install -U scikit-learn

When I am trying to import the library or it's module like

from sklearn.model_selection import train_test_split

or simply import sklearn

I am getting the error

ImportError                               Traceback (most recent call last)
<ipython-input-24-73edc048c06b> in <module>()
----> 1 from sklearn.model_selection import train_test_split

c:\users\ajain9\appdata\local\programs\python\python36-32\lib\site-packages\sklearn\__init__.py in <module>()
    132 else:
    133     from . import __check_build
--> 134     from .base import clone
    135     __check_build  # avoid flakes unused variable error
    136 

c:\users\ajain9\appdata\local\programs\python\python36-32\lib\site-packages\sklearn\base.py in <module>()
     11 from scipy import sparse
     12 from .externals import six
---> 13 from .utils.fixes import signature
     14 from . import __version__
     15 

c:\users\ajain9\appdata\local\programs\python\python36-32\lib\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,
     11                          assert_all_finite,

ImportError: cannot import name 'murmurhash3_32'

Any reason this error might be happening?

I am using Python version 3.6.3 Numpy v 1.13.3 pandas v 0.21.0

I am using windows

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Aklank Jain
  • 1,002
  • 1
  • 13
  • 21

1 Answers1

1

Try using virutalenv and install all the libraries required there, it worked for me.

Aklank Jain
  • 1,002
  • 1
  • 13
  • 21