AttributeError: module 'scipy.misc' has no attribute 'imread'

运行python程序报错:AttributeError: module 'scipy.misc' has no attribute 'imread'

报错原因1:scipy版本过高

解决方案:降低scipy版本,如下:

pip install scipy==1.2.1

报错原因2:查看scipy.misc帮助文件得知,imread依赖于pillow

解决方法:在该python环境中,安装Pillow即可

pip install Pillow
上一篇:转:stack


下一篇:module 'scipy.misc' has no attribute 'toimage',python