安装Anaconda后,Scikit-learn.datasets无法运行

时间:2017-08-15 15:11:05

标签: python syntax scikit-learn anaconda

我在使用Anaconda和Scikit-learn时遇到了问题。当我在他们的网站上执行教程时:http://scikit-learn.org/stable/tutorial/basic/tutorial.html它返回时出现以下错误:

Traceback (most recent call last):
File "C:/Users/Max/.PyCharmCE2017.1/config/scratches/scratch_2.py", line 1, in <module>
from sklearn import datasets
File "D:\Python\Anaconda\lib\site-packages\sklearn\datasets\__init__.py", line 25, in <module>
from .mldata import fetch_mldata, mldata_filename
File "D:\Python\Anaconda\lib\site-packages\sklearn\datasets\mldata.py", line 12, in <module>
from urllib2 import HTTPError
File "D:\Python\Anaconda\lib\urllib2.py", line 254
raise AttributeError, attr
                    ^
SyntaxError: invalid syntax

Anaconda已更新,sklearn也是如此。我不确定问题出在哪里。我认为这与urllib2没有在python 3中有关,但从我读过的内容来看,sklearn具有可比性。

0 个答案:

没有答案