运行python时出现以下错误: ImportError: No module named misc
在python中运行以下这个程序fromscipy.miscimportimread,imsave,imresizeimg=imread('assets/cat.jpg'...
在python中运行以下这个程序
from scipy.misc import imread,imsave,imresize
img=imread('assets/cat.jpg')
print img.dtype,img.shape #print "nint8(400,248,3)"
img_tinted=img*[1,0.95,0.9]
img_tinted=imresize(img_tinted,(300,300))
imsave('assets/cat_tinted.jpg',img_tinted)
出现以下问题:
Traceback (most recent call last):
File "E:/Python27/lession/scipy.py", line 1, in <module>
from scipy.misc import imread,imsave,imresize
File "E:/Python27/lession\scipy.py", line 1, in <module>
from scipy.misc import imread,imsave,imresize
ImportError: No module named misc 展开
from scipy.misc import imread,imsave,imresize
img=imread('assets/cat.jpg')
print img.dtype,img.shape #print "nint8(400,248,3)"
img_tinted=img*[1,0.95,0.9]
img_tinted=imresize(img_tinted,(300,300))
imsave('assets/cat_tinted.jpg',img_tinted)
出现以下问题:
Traceback (most recent call last):
File "E:/Python27/lession/scipy.py", line 1, in <module>
from scipy.misc import imread,imsave,imresize
File "E:/Python27/lession\scipy.py", line 1, in <module>
from scipy.misc import imread,imsave,imresize
ImportError: No module named misc 展开
1个回答
2015-05-11
展开全部
没有模块misc,可能是你没有安装这个模块,或者是安装的有问题。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询