我上面有 centos 6.3 和 python 2.6,当我尝试通过 easy_install 安装它时,出现以下错误:
_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,如果有帮助的话。
你需要安装python26-devel
在你可以编译之前anyPython 扩展。
要编译 Pillow,您还需要安装各种其他库的开发头文件,包括libjpeg-devel
and zlib-devel
。请参阅枕头安装说明 http://pillow.readthedocs.org/en/latest/installation.html有关需要哪些外部库的更多详细信息。
您还可以安装而不是特定于版本的软件包python-devel
;您将获得适合您的发行版的版本。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)