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代码格式调整方法

前言序锦 很多时候,当我们在使用编辑器的时候,遇到复制粘贴,修改别人代码等等的时候,都会遇到这个让人头疼的问题,那就是如何解决格式问题,今天就让华仔带你一起去解决这些困扰了你好久的问题吧...

Python中str.format()详解

1. str.format 的引入 在 Python 中,我们可以使用 + 来连接字符串,在简单情况下这种方式能够很好的工作。但是当我们需要进行复杂的字符串连接时,如果依然使用 + 来...

如何使用python操作vmware

import pysphere from pysphere import VIServer host_ip = "200.200.173.45" username = "admi...

Django ORM框架的定时任务如何使用详解

Django ORM框架的定时任务如何使用详解

前言 大家在Django项目开发过程中,是不是也经常遇到这样的场景:需要实现一个定时任务,但又不想脱离Django环境独立运行,如:还需要使用Django的ORM框架操作Models类、...

Python中的urllib模块使用详解

urllib模块提供的上层接口,使我们可以像读取本地文件一样读取www和ftp上的数据。每当使用这个模块的时候,老是会想起公司产品的客户端,同事用C++下载Web上的图片,那种“痛苦”的...