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计时相关操作详解【time,datetime】

本文实例讲述了Python计时相关操作。分享给大家供大家参考,具体如下: 内容目录: 1. 时间戳 2. 当前时间 3. 时间差 4. python中时间日期格式化符号 5. 例子 一、...

pandas 数据结构之Series的使用方法

1. Series Series 是一个类数组的数据结构,同时带有标签(lable)或者说索引(index)。 1.1 下边生成一个最简单的Series对象,因为没有给Series指定索...

python 检查数据中是否有缺失值,删除缺失值的方式

# 检查数据中是否有缺失值 np.isnan(train).any() Flase:表示对应特征的特征值中无缺失值 True:表示有缺失值 通常情况下删除行,使用参数axis =...

关于Python形参打包与解包小技巧分享

Python中的函数调用与c++不同的是将this指针直接作为self当作第一个形参进行处理,从而将静态函数与实例方法的调用形式统一了起来。在实际编程过程中,可以通过传递函数的地址、函数...

Python开发之基于模板匹配的信用卡数字识别功能

Python开发之基于模板匹配的信用卡数字识别功能

环境介绍 Python 3.6 + OpenCV 3.4.1.15 原理介绍 首先,提取出模板中每一个数字的轮廓,再对信用卡图像进行处理,提取其中的数字部分,将该部分数字与模板进行匹...