"ImportError: cannot import name" with fresh Anaconda install

"ImportError: cannot import name" with fresh Anaconda install

我在 iPython 笔记本中收到以下错误:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-06ac68ebf148> in <module>()
      5 import pandas as pd
      6 import numpy as np
----> 7 from sklearn import neighbours
      8 
      9 start_time = time.time()

ImportError: cannot import name neighbours

同时尝试 运行 以下内容:

# Import required packages
import time
import pandas as pd
import numpy as np
from sklearn import neighbours

我在命令行上遇到了同样的问题。我的怀疑:

我最近卸载了一个独立的 Python 应用程序。我还多次重新安装了 Anadonda 和 scikit-learn、numpy 和 scipy 包。

我在 Windows 7.

上使用 Python 2.7.11 到 Anaconda 2.5.0

你想要邻居的美式拼写,即

from sklearn import neighbors