【发布时间】:2019-12-27 23:26:33
【问题描述】:
我正在阅读 Deep Learning with R (https://livebook.manning.com/book/deep-learning-with-r/chapter-5/112) 一书的第 5 章。
运行下面代码时,出现如下错误:Error in py_iter_next(it, completed) : ImportError: Could not import PIL.Image. The use of load_img requires PIL.
有关此错误消息的所有答案都建议使用pip install pillow。当我在终端中运行它时,会出现以下内容:
Requirement already satisfied: pillow in /anaconda3/lib/python3.7/site-packages (6.1.0)
因此,Pillow 已经安装,而我无法运行下面的代码。 我正在使用 Mac Book Pro 平台 x86_64-apple-darwin15.6.0 以及 R 版本 3.6.0 (2019-04-26)。我的机器上也安装了 Python 3.7.3。非常感谢任何推荐和支持!
#Displaying a batch of data and labels
batch <- generator_next(train_generator)
str(batch)
【问题讨论】:
标签: python r tensorflow keras deep-learning