python安装PIL失败原因及解决方案
2020-01-21 本文已影响0人
创造new_world
在windows下的虚拟环境安装PIL:
pip install PIL
出现报错信息:

原因:
经过查询资料发现,python2可以使用pip install PIL安装PIL第三方包。而我是使用的是python3,现在python3已经用Pillow代替PIL。
解决办法:
使用 pip install Pillow 安装即可,效果如下:


在windows下的虚拟环境安装PIL:
pip install PIL
出现报错信息:
原因:
经过查询资料发现,python2可以使用pip install PIL安装PIL第三方包。而我是使用的是python3,现在python3已经用Pillow代替PIL。
解决办法:
使用 pip install Pillow 安装即可,效果如下: