Python 3.4.3(v3.4.3:9b73f1c3e601,2015年2月23日,02:52:03) [达尔文的GCC 4.2.1(Apple Inc. build 5666)(第3点)] 输入" help"," copyright"," credit"或"许可证"了解更多信息。
import sklearn
sklearn.__version__
'0.16.1'
from sklearn.neighbors import NearestNeighbors
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sklearn/neighbors/__init__.py", line 9, in <module>
from .graph import kneighbors_graph, radius_neighbors_graph File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sklearn/neighbors/graph.py", line 9, in <module>
from .base import KNeighborsMixin, RadiusNeighborsMixin File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sklearn/neighbors/base.py", line 18, in <module>
from ..metrics import pairwise_distances File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sklearn/metrics/__init__.py", line 15, in <module>
from .classification import accuracy_score File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sklearn/metrics/classification.py", line 31, in <module>
from ..preprocessing import LabelBinarizer, label_binarize File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/sklearn/preprocessing/__init__.py", line 25, in <module>
from ._weights import balance_weights ImportError: cannot import name 'balance_weights'