ImportError: cannot import name 'Image'

导入python图像处理模块时报错,如下图所示:

ImportError: cannot import name 'Image'_第1张图片

开始以为PIL模块没有安装,准备用pip安装时发现该模块已存在:

解决办法:考虑到有可能是版本过低的问题,就卸载掉pillow,重新安装了:

ImportError: cannot import name 'Image'_第2张图片

重新导入,没有报错!

ImportError: cannot import name 'Image'_第3张图片

 

你可能感兴趣的:(python学习)