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

相关文章

pycharm 取消默认的右击运行unittest的方法

取消默认的右击运行unittest方法: File-> Settings -> Tools -> Python Integrated Tools -> Defau...

python flask框架实现传数据到js的方法分析

本文实例讲述了python flask框架实现传数据到js的方法。分享给大家供大家参考,具体如下: 首先要清楚后台和前端交互所采用的数据格式。 一般选JSON,因为和js完美贴合。 后台...

深度定制Python的Flask框架开发环境的一些技巧总结

Flask 环境配置 你的应用程序可能需要大量的软件包才能正常的工作。如果都不需要 Flask 包的话,你有可能读错了教程。当应用程序运行的时候,你的应用程序的 环境 基本上是所有一切事...

PyQt 实现使窗口中的元素跟随窗口大小的变化而变化

PyQt 实现使窗口中的元素跟随窗口大小的变化而变化

* 如果要实现这种视觉状态,那么就需要使用布局的方法。 创建一个控件后,在主窗口上右击选择布局(layout) Lay Out Horizontally : 纵向布局 Lay Out...

selenium在执行phantomjs的API并获取执行结果的方法

前言 因为最近要写一个抓取sitemap和相应的参数的小脚本,现有的爬虫无论用什么语言写的,几乎都无法抓取参数,所以我思考了一下,先做一个简单的总结。 本来以为写个这种sitemap的爬...