AttributeError:模块'PIL.ImageFile文件'没有属性'ImageFile'
我用“pip install pillow”命令安装了PIL
From PIL import Image
sourceFileName = "source.png"
Avatar= Image.open(sourceFileName)
File "d:/sourcecode/test.py", line 3, in <module>
Avatar= Image.open(sourceFileName)
File "C:\**\Python37-32\lib\site-packages\PIL\Image.py", line 2663, in open
Preinit()
File "C:\**\Python37-32\lib\site-packages\PIL\Image.py", line 381, in preinit
From . import BmpImagePlugin
File "C:\**\Python37-32\lib\site-packages\PIL\BmpImagePlugin.py", line 61, in <module>
Class BmpImageFile(ImageFile.ImageFile):
AttributeError: module 'PIL.ImageFile' has no attribute 'ImageFile'
目前没有回答
相关问题 更多 >
编程相关推荐