gpt4 book ai didi

python - 无法在centos上安装Pillow

转载 作者:太空狗 更新时间:2023-10-29 21:14:45 26 4
gpt4 key购买 nike

当我尝试通过 easyinstall 安装时,我有 cenots 6.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。

最佳答案

在编译任何 Python 扩展之前,您需要安装python26-devel

要编译 Pillow,您还需要安装各种其他库的开发 header ,包括 libjpeg-develzlib-devel。查看Pillow installation instructions有关需要哪些外部库的更多详细信息。

关于python - 无法在centos上安装Pillow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20945610/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com