当我尝试通过easyinstall安装cenots6.3和python 2.6时,我得到了以下错误:
_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,如果这有帮助的话。
发布于 2014-01-06 16:18:17
您需要先安装python26-devel,然后才能编译任何Python扩展。
要编译Pillow,还需要安装各种其他库的开发头文件,包括libjpeg-devel和zlib-devel。有关需要哪些外部库的更多详细信息,请参阅Pillow installation instructions。
发布于 2016-01-23 05:38:52
请确保先运行以下命令:
sudo yum install python-devel libjpeg-devel zlib-devel
发布于 2016-01-07 08:49:00
对于任何想要当前解决方案(centos7和python2.7.5)的人来说,你需要的不是python26-devel,而是python-devel.x86_64
https://stackoverflow.com/questions/20945610
复制相似问题