CentOS安装pillow报错的解决方法

yipeiwu_com5年前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 列表推导式使用详解

所谓的列表推导式,就是指的轻量级循环创建列表。 基本使用方式 # 创建一个0-10的列表 a = [x for x in range(11)] print(a) """ 输出结果:...

简介Django中内置的一些中间件

认证支持中间件 中间件类: django.contrib.auth.middleware.AuthenticationMiddleware . django.contrib.auth.m...

浅析PEP572: 海象运算符

现在已经是Python 3.8的最后一个alpha版本,接着就是本月底要发布的的3.8.0 beta 1了。按规定,3.8已经不会再添加(修改)功能了,之前非常有争议的PEP 572的实...

python3+dlib实现人脸识别和情绪分析

python3+dlib实现人脸识别和情绪分析

一、介绍 我想做的是基于人脸识别的表情(情绪)分析。看到网上也是有很多的开源库提供使用,为开发提供了很大的方便。我选择目前用的比较多的dlib库进行人脸识别与特征标定。使用python也...

python检测某个变量是否有定义的方法

本文实例讲述了python检测某个变量是否有定义的方法。分享给大家供大家参考。具体如下: 第一种方法使用内置函数locals(): 'testvar'   in&nb...