安装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安装模式。