CentOS安装pillow报错的解决方法

yipeiwu_com6年前Python基础

安装pillow出现以下问题:

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

----------------------------------------
Cleaning up...
Command /usr/local/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-SviNMc-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pillow
Storing debug log for failure in /root/.pip/pip.log

StackOverflow:
http://stackoverflow.com/questions/34631806/fail-during-installation-of-pillow-python-module-in-linux

解决:

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

相关文章

玩转python selenium鼠标键盘操作(ActionChains)

用selenium做自动化,有时候会遇到需要模拟鼠标操作才能进行的情况,比如单击、双击、点击鼠标右键、拖拽等等。而selenium给我们提供了一个类来处理这类事件——ActionChai...

django中的HTML控件及参数传递方法

本文对djangoHTML的表单控件中的单选及多选进行介绍,并说明如何进行参数传递。 1.HTML中的表单控件: 在HTML中表单的书写一般为: <form method="p...

对Django中的权限和分组管理实例讲解

权限 Django中内置了权限的功能。他的权限都是针对表或者说是模型级别的。比如对某个模型上的数据是否可以进行增删改查操作。他不能针对数据级别的,比如对某个表中的某条数据能否进行增删改查...

Python进程,多进程,获取进程id,给子进程传递参数操作示例

Python进程,多进程,获取进程id,给子进程传递参数操作示例

本文实例讲述了Python进程,多进程,获取进程id,给子进程传递参数操作。分享给大家供大家参考,具体如下: 线程与线程之间共享全局变量,进程之间不能共享全局变量。 进程与进程相互独立&...

浅谈python中set使用

浅谈python中set使用 In [2]: a = set() # 常用操作1 In [3]: a Out[3]: set() In [4]: type(a) O...