安装pillow

来源:互联网 发布:.games域名 编辑:程序博客网 时间:2024/05/16 02:07

今天在使用django中的ImageField时出现错误:

(fields.E210) Cannot use ImageField because Pillow is not installed.HINT: Get Pillow at https://pypi.python.org/pypi/Pillow or run command "pip install Pillow".

pillow介绍
Python Imaging Library (Fork)
Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors.

于是在网站https://pypi.python.org/pypi/Pillow上下载Pillow-3.1.2.tar.gz (md5)
执行命令

tar -zxvf Pillow-3.1.2.tar.gzcd Pillow-3.1.2python setup.py install

之后报错

ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting

安装依赖库

yum install python-develyum install zlib-develyum install libjpeg-turbo-devel

之后成功!

0 0
原创粉丝点击