参考:https://blog.csdn.net/ahuan08/article/details/69229338
用Python做图像处理时,需要用到PIL(图像处理库)。但是PIL已停止更新,而Pillow是对PIL很友好的分支,因此本文介绍win8(win7上同样适用)上如何安装Pillow库。
1.在python的安装路径找到easy_install工具:C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts\easy_install-3.7.exe
2.直接打开cmd,然后进入上述目录.
在命令提示符内进入当前目录:cd C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\Scripts
(cd+空格+路径)
3.安装Pillow:pip install pillow (下图网上截图的)
提示:
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the ‘python -m pip install --upgrade pip’ comm
and.
使用python -m pip install --upgrade pip命令更新pip版本,出现下图界面:
4、如果"python -m pip install --upgrade pip"提示“python 不是内部命令 。。。”,需要为python 配置系统变量。
至此安装成功。
使用pip安装matplotlib,道理是一样的,也是cmd先进入到pip所在的目录:(本机)D:\Program Files\python\Scripts。运行命令 pip install matplotlib就行