我使用命令
在python中安装了scikit-learn库pip install -U scikit-learn
当我尝试导入库或类似
的模块时from sklearn.model_selection import train_test_split
或简单地import sklearn
我遇到错误
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'
任何原因可能会发生此错误?
我正在使用Python版本3.6.3 Numpy v 1.13.3 pandas v 0.21.0
我正在使用Windows
答案 0 :(得分:0)
尝试使用virutalenv并在那里安装所需的所有库,它对我有用。