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 Tensor和Array对比分析

如下所示: 区别 Array Tensor 类型 uint8,float3...

python中尾递归用法实例详解

本文实例讲述了python中尾递归用法。分享给大家供大家参考。具体分析如下: 如果一个函数中所有递归形式的调用都出现在函数的末尾,我们称这个递归函数是尾递归的。当递归调用是整个函数体中最...

Python操作SQLite数据库的方法详解

本文实例讲述了Python操作SQLite数据库的方法。分享给大家供大家参考,具体如下: SQLite简单介绍 SQLite数据库是一款非常小巧的嵌入式开源数据库软件,也就是说没有独立的...

python 五子棋如何获得鼠标点击坐标

python 五子棋如何获得鼠标点击坐标

这篇文章主要介绍了python 五子棋如何获得鼠标点击坐标,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下 点坐标的取自: from...

python读文件逐行处理的示例代码分享

复制代码 代码如下:import os ## for os.path.isfile() def dealline(line) :    print(line...