欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

安装 PIL失败 的解决 有大用

shiping1 的头像
直接用 import Image 有问题
最好用  from PIL import Image

安装 PIL 老是报错
error: Setup script exited with error: command 'gcc' failed with exit status 1
上海-洛克(32792000)  0:39:44
现在用pillow更好
brew pillow
brew intall pillow
泪痕_元怜 (958186957)  0:40:19
pillow 是什么
相当 于PIL吗
上海-洛克(32792000)  0:40:29
pil的分支
相当于pil
pil好久没更新了
泪痕_元怜 (958186957)  0:40:42

brew  又是什么 相当于 pip 或者 easy_install吗
上海-洛克(32792000)  0:41:46
...
mac下安装的东西
泪痕_元怜 (958186957)  0:42:51
哦 我用的是win7
上海-洛克(32792000)  0:43:14
http://pillow.readthedocs.org/en/latest/installation.html#simple-installation
机器人-小囧(1954655289)  0:43:15
上海-洛克: 网页标题: Installation — Pillow v2.5.0 (PIL fork)
上海-洛克(32792000)  0:43:25
这里是pillow的官方介绍
有安装方法
pip install Pillow
泪痕_元怜 (958186957)  0:44:04
好的 谢谢啦 
上海-洛克(32792000)  0:44:31
应用的话, from PIL import Image
泪痕_元怜 (958186957)  0:45:57
能简略说下原理吗
上海-洛克(32792000)  0:48:07
不知道

Python2.7 常用第三方库的安装方法

1: 安装PIL或者PILLOW的方法:

PIL是Python Imaging Library的简写,是Python中最常用的图像处理库.

如果是MAC 10.9.4系统的话, 用sudo easy_install PIL安装pil可能会出现错误,谷歌搜索的话,很多人都会出现这样那样的问题.

pillow是pil的替代品,更容易安装.pillow的最新信息可以参考这里或者中文文档

  • 安装方法:

    •  brew install libtiff libjpeg webp little-cms2
       sudo pip install pillow
      
    • 使用方法:在需要import Image,ImageDraw的地方用下面的语句代替

      from PIL import Image,ImageDraw
来自 http://playbear.github.io/2014/08/17/3rd_lib/
普通分类: