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中利用函数装饰器实现备忘功能

“备忘”的定义 “memoization”(备忘)这个词是由Donald Michie在1968年提出的,它基于拉丁语单词“memorandum”(备忘录),意思是“被记住”。虽然它和单...

python计算方程式根的方法

本文实例讲述了python计算方程式根的方法。分享给大家供大家参考。具体实现方法如下: ''' roots = polyRoots(a). Uses Laguerre's met...

解决Matplotlib图表不能在Pycharm中显示的问题

解决Matplotlib图表不能在Pycharm中显示的问题

初学者可能都会遇到一个小问题就是:在用IPython的时候,可以使用类似 %matplotlib inline 的Magic Function(魔法函数)来显示Matplotlib...

tensorflow 获取变量&打印权值的实例讲解

tensorflow 获取变量&打印权值的实例讲解

在使用tensorflow中,我们常常需要获取某个变量的值,比如:打印某一层的权重,通常我们可以直接利用变量的name属性来获取,但是当我们利用一些第三方的库来构造神经网络的layer时...

python实现计数排序与桶排序实例代码

python实现计数排序与桶排序实例代码

计数排序 找到给定序列的最小值与最大值 创建一个长度为最大值-最小值+1的数组,初始化都为0 然后遍历原序列,并为数组中索引为当前值-最小值的值+1 此时数组中已经记录...