【Python】安装PIL (Python Imaging Library )

安装成功PIL,并非指令pip install PIL,而是pip install Pillow


以下转自原博文

python 安装PIL (Python Imaging Library ) 提示

[python] view plain copy
  1. Could not find a version that satisfies the requirement PIL (from versions: )  
  2. No matching distribution found for PIL  

开始用
[python] view plain copy
  1. sudo pip install PIL   
总是提示上述错误


用命令

[python] view plain copy
  1. sudo pip search PIL  

出现  Pillow (3.2.0)         Python Imaging Library (Fork)

名字变了 。。。。。。


下面正确方式

尝试用命令安装

[python] view plain copy
  1. sudo pip install Pillow  

通过 命令引入   from PIL import Image( Pillow由PIL而来,所以该导入该库使用import PIL) 正确

猜你喜欢

转载自blog.csdn.net/u011511601/article/details/80628273