安装PIL (Python Image Library) 时,使用:sudo pip install PIL
提示:
Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL
改用:sudo pip install Pillow
安装成功,注意Pillow就是Python Image Library。
from PIL import Image, ImageDraw,ImageFont可正常使用。
另外需要特别注意:进入mac“终端”,直接输入“sudo pip install pygame”,进入Python2.7的Pygame安装模式。“sudo pip3 install pygame”则进入Python3.6的Pygame安装模式。
本文介绍了在遇到无法找到满足PIL要求的版本时如何通过安装Pillow来解决,并提供了使用Python Image Library的基本示例代码。
3802

被折叠的 条评论
为什么被折叠?



