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

相关文章

Caffe均值文件mean.binaryproto转mean.npy的方法

mean.binaryproto转mean.npy 使用Caffe的C++接口进行操作时,需要的图像均值文件是pb格式,例如常见的均值文件名为mean.binaryproto;但在使用p...

Python入门教程之运算符与控制流

Python入门教程之运算符与控制流

Python 中的运算符 什么是运算符?举个简单的例子 4 +5 = 9 。 例子中,4 和 5 被称为操作数,"+" 称为运算符。 1 . 求幂运算符 在 Java 中如果我们想对一...

python插入排序算法实例分析

本文实例讲述了python插入排序算法。分享给大家供大家参考。具体如下: def insertsort(array): for removed_index in range(1...

Python实现计算两个时间之间相差天数的方法

本文实例讲述了Python实现计算两个时间之间相差天数的方法。分享给大家供大家参考,具体如下: #-*- encoding:UTF-8 -*- from datetime impor...

python实现小球弹跳效果

python实现小球弹跳效果

本文实例为大家分享了python实现小球弹跳效果的具体代码,供大家参考,具体内容如下 import pygame, sys pygame.init() screenGameC...