我正在尝试使用scikit learn从LFW dataset获取数据:from sklearn.datasets import fetch_lfw_people
faces = fetch_lfw_people(min_faces_per_person=60)
执行此操作时,我收到一条导入错误消息:The Python Imaging Library (PIL) is required to load data from jpeg files
错误消息指示我需要安装pillow。因此,我从我的Jupyter笔记本中安装了pillow,如下所示:
^{pr2}$
现在我可以做import PIL,但是当我试图从LFW数据集获取数据时,仍然会收到相同的错误消息。在
我使用的是python3.6。这是完整的轨迹:ImportError Traceback (most recent call last) ~\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\datasets\lfw.py in _load_imgs(file_paths, slice_, color, resize)
143 try:
--> 144 from scipy.misc import imread
145 except ImportError:
ImportError: cannot import name 'imread'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last) ~\AppData\Local\C