第一张 module has no attribute toimage的问题解决方法:在scipy/misc/init.py中:
bytescale - Byte scales an array (image) [requires Pillow]
fromimage - Return a copy of a PIL image as a numpy array [requires Pillow]
imfilter - Simple filtering of an image [requires Pillow]
imread - Read an image file from a filename [requires Pillow]
imresize - Resize an image [requires Pillow]
imrotate - Rotate an image counter-clockwise [requires Pillow]
imsave - Save an array to an image file [requires Pillow]
imshow - Simple showing of an image through an external viewer [requires Pillow]
toimage - Takes a numpy array and returns a PIL image [requires Pillow]
所以请安装pillow,pip install pillow, conda install pillow
这样就解决了
第一张 module has no attribute toimage的问题解决方法:在scipy/misc/init.py中: bytescale - Byte scales an array (image) [requires Pillow] fromimage - Return a copy of a PIL image as a numpy array [requires Pillow] imfilter - Simple filtering of an image [requires Pillow] imread - Read an image file from a filename [requires Pillow] imresize - Resize an image [requires Pillow] imrotate - Rotate an image counter-clockwise [requires Pillow] imsave - Save an array to an image file [requires Pillow] imshow - Simple showing of an image through an external viewer [requires Pillow] toimage - Takes a numpy array and returns a PIL image [requires Pillow] 所以请安装pillow,pip install pillow, conda install pillow 这样就解决了