Scikit-learn的fetch不下载数据集

时间:2013-04-27 19:26:36

标签: python python-3.x scipy scikit-learn

从iPython开始,我执行了

from sklearn.datasets import fetch_olivetti_faces

该命令似乎立即执行,In [43]出现在命令的前面。

但是我在get_home_data()给出的位置找不到任何内容,我也不能

data = fetch_olivetti_faces()

错误:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-44-6a7f4fc09c38> in <module>()
      1 # fetch the faces data
----> 2 data = fetch_olivetti_faces()

C:\Python33\lib\site-packages\sklearn\datasets\olivetti_faces.py in fetch_olivetti_faces(data_home, shuffle, random_state, download_if_missing)
     87               % (DATA_URL, data_home)))
     88         fhandle = urllib.request.urlopen(DATA_URL)
---> 89         buf = StringIO(fhandle.read())
     90         mfile = loadmat(buf)
     91         faces = mfile['faces'].T.copy()

TypeError: initial_value must be str or None, not bytes

downloading Olivetti faces from http://cs.nyu.edu/~roweis/data/olivettifaces.mat to C:\Users\me\scikit_learn_data

1 个答案:

答案 0 :(得分:1)