解决AttributeError: module 'scipy.misc' has no attribute 'toimage'报错问题

学习MNIST机器学习入门课程时,运行书中例程save_pic.py时,出现AttributeError: module ‘scipy.misc’ has no attribute 'toimage’报错问题,截图如下:
解决AttributeError: module 'scipy.misc' has no attribute 'toimage'报错问题
这是因为当前环境没有安装PIL库,库名现在为Pillow,解决方法如下:
点击Pycharm中的File→Setting:
解决AttributeError: module 'scipy.misc' has no attribute 'toimage'报错问题
解决AttributeError: module 'scipy.misc' has no attribute 'toimage'报错问题
解决AttributeError: module 'scipy.misc' has no attribute 'toimage'报错问题
解决AttributeError: module 'scipy.misc' has no attribute 'toimage'报错问题
安装完成,按ok回到程序编辑界面,重新运行即可:
解决AttributeError: module 'scipy.misc' has no attribute 'toimage'报错问题