我正在尝试在Python2.7上使用scikit-learn,但导入会产生错误。
from sklearn.preprocessing import normalize
import numpy as np
这会产生以下错误
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-1608d2dbd4a8> in <module>()
2 from scipy.sparse.linalg import svds
3 from scipy.sparse import hstack, diags, csr_matrix
----> 4 from sklearn.preprocessing import normalize
5 import numpy as np
6 import csv
C:\Python27\lib\site-packages\sklearn\preprocessing\__init__.pyc in <module>()
4 """
5
----> 6 from .data import Binarizer
7 from .data import KernelCenterer
8 from .data import MinMaxScaler
C:\Python27\lib\site-packages\sklearn\preprocessing\data.pyc in <module>()
13 from ..base import BaseEstimator, TransformerMixin
14 from ..externals import six
---> 15 from ..utils import check_arrays
16 from ..utils import atleast2d_or_csc
17 from ..utils import array2d
C:\Python27\lib\site-packages\sklearn\utils\__init__.pyc in <module>()
8 import warnings
9
---> 10 from .murmurhash import murmurhash3_32
11 from .validation import (as_float_array, check_arrays, safe_asarray,
12 assert_all_finite, array2d, atleast2d_or_csc,
ImportError: cannot import name murmurhash3_32
我使用pip install -U scikit-learn
安装了scikit-learn
有些人可以帮我解决这个问题。