[英]"ImportError: cannot import name" with fresh Anaconda install
I am receiving the following error in an iPython notebook:我在 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
Whilst trying to run the following:在尝试运行以下内容时:
# Import required packages
import time
import pandas as pd
import numpy as np
from sklearn import neighbours
I get the same issue on the command line.我在命令行上遇到了同样的问题。 My suspicions:我的怀疑:
I have recently uninstalled a standalone Python application.我最近卸载了一个独立的 Python 应用程序。 I have also reinstalled Anadonda and the scikit-learn, numpy and scipy packages multiple times.我还多次重新安装了 Anadonda 和 scikit-learn、numpy 和 scipy 包。
I am using Python 2.7.11 through Anaconda 2.5.0 on Windows 7.我在 Windows 7 上通过 Anaconda 2.5.0 使用 Python 2.7.11。
你想要邻居的美式拼写,即
from sklearn import neighbors
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.