首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在centos上安装Pillow

无法在centos上安装Pillow
EN

Stack Overflow用户
提问于 2014-01-06 16:07:52
回答 3查看 10.8K关注 0票数 7

当我尝试通过easyinstall安装cenots6.3和python 2.6时,我得到了以下错误:

代码语言:javascript
复制
_imaging.c:76:20: error: Python.h: No such file or directory
In file included from /tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/Imaging.h:14,
                 from _imaging.c:82:
/tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/ImPlatform.h:14:2: error: #error Sorry, this library requires support for ANSI prototypes.
/tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/ImPlatform.h:17:2: error: #error Sorry, this library requires ANSI header files.
/tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/ImPlatform.h:55:2: error: #error Cannot find required 32-bit integer type
In file included from _imaging.c:82:
/tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/Imaging.h:93: error: expected specifier-qualifier-list before ‘INT32’
/tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/Imaging.h:400: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ImagingCRC32’
......................
_imaging.c:3409: error: expected ‘)’ before ‘*’ token
error: Setup script exited with error: command 'gcc' failed with exit status 1

顺便说一句,我的gcc编译器是4.4.7,如果这有帮助的话。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2014-01-06 16:18:17

您需要先安装python26-devel,然后才能编译任何Python扩展。

要编译Pillow,还需要安装各种其他库的开发头文件,包括libjpeg-develzlib-devel。有关需要哪些外部库的更多详细信息,请参阅Pillow installation instructions

票数 15
EN

Stack Overflow用户

发布于 2016-01-23 05:38:52

请确保先运行以下命令:

sudo yum install python-devel libjpeg-devel zlib-devel

票数 9
EN

Stack Overflow用户

发布于 2016-01-07 08:49:00

对于任何想要当前解决方案(centos7和python2.7.5)的人来说,你需要的不是python26-devel,而是python-devel.x86_64

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20945610

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档