Python error:cannot import name ‘imread‘ from ‘scipy.ndimage‘
阅读量:3904 次
发布时间:2019-05-23
本文共 298 字,大约阅读时间需要 1 分钟。
Python error:cannot import name 'imread' from 'scipy.ndimage'
错误原因
这是因为从scipy1.3.0开始,imread已从这个模块移除
解决方法
第一种解决方法是将scipy卸载并重新安装1.3.0以下的版本。
第二种解决方法是安装imageio from from scipy.misc import imread to from imageio import imread from scipy.misc import imread种的mode改为from imageio import imread中的pilmode