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基础之函数用法实例详解

本文以实例形式较为详细的讲述了Python函数的用法,对于初学Python的朋友有不错的借鉴价值。分享给大家供大家参考之用。具体分析如下: 通常来说,Python的函数是由一个新的语句编...

Python多进程同步简单实现代码

本文讲述了Python多进程同步简单实现代码。分享给大家供大家参考,具体如下: #encoding=utf8 from multiprocessing import Process,...

Python Requests库基本用法示例

本文实例讲述了Python Requests库基本用法。分享给大家供大家参考,具体如下: requests是python的一个http client库,提供了一套简捷的API供开发者使用...

Python 常用 PEP8 编码规范详解

Python 常用 PEP8 编码规范 代码布局 缩进 每级缩进用4个空格。 括号中使用垂直隐式缩进或使用悬挂缩进。 EXAMPLE: # (垂直隐式缩进)对准左括号 f...

python操作excel文件并输出txt文件的实例

如下所示: #coding=utf-8 import os import xlrd #excel文件放置在当前路径 path='model.xls' #打开文件 data=xlrd....