Python错误集锦:提示没有安装PIL,ModuleNotFoundError: No module named ‘PIL’

原文链接:http://www.juzicode.com/python-error-no-module-named-pil

错误提示:

提示没有安装PIL,ModuleNotFoundError: No module named 'PIL'
File D:\Python\Python310\lib\site-packages\matplotlib\colors.py:52
     49 from numbers import Real
     50 import re
---> 52 from PIL import Image
     53 from PIL.PngImagePlugin import PngInfo
     55 import matplotlib as mpl

ModuleNotFoundError: No module named 'PIL'

但是pip list能看到pillow版本

错误原因:

1、安装包冲突

解决方法:

1、使用pip install –no-cache-dir Pillow重新安装


如果本文还没有完全解决你的疑惑,你也可以在微信公众号“桔子code”后台给我留言,欢迎一起探讨交流。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注