>>> import scipy
>>> scipy.misc
<module 'scipy.misc' from 'C:\Python27\lib\site-packages\scipy\misc\__init__.pyc'>
>>> scipy.misc.imread('test.tif')
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
scipy.misc.imread('test.tif')
AttributeError: 'module' object has no attribute 'imread'
如题
解法一:在相应环境下安装Pillow,然后导
pip install Pillow
import scipy.misc
解法二:换一种读取方法
import imageio
content_image = imageio.imread