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中文编码那些事

首先,要明白encode()和decode()的区别  encode()的作用是将Unicode编码的字符串转换为其他编码格式。 例如: st1.encode("utf-8")...

Python time库基本使用方法分析

本文实例讲述了Python time库基本使用方法。分享给大家供大家参考,具体如下: 时间获取 time() 获取当前时间戳,为一个浮点数 >>>time....

深入理解NumPy简明教程---数组2

NumPy数组(2、数组的操作) 基本运算 数组的算术运算是按元素逐个运算。数组运算后将创建包含运算结果的新数组。 >>> a= np.array([20,30...

win7安装python生成随机数代码分享

复制代码 代码如下:import random def genrand(small, big) :    return small + (big-small...

树莓派与PC端在局域网内运用python实现即时通讯

电脑和树莓派在同一局域网内,先在电脑和树莓派创建python运行环境,然后在树莓派中用python运行rpi.py;在电脑上运行computer.py;电脑上输入字符即可在树莓派上即时显...