Reputation: 2813
I cannot install PIL on my Centos 5.8 x64. I tried to install it using pip install PIL command. But it encounters a gcc error. Please see below error snippet:
_imagingft.c:475: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
_imagingft.c:502: error: old-style parameter declarations in prototyped function definition
/usr/include/freetype2/freetype/freetype.h:1574: error: parameter name omitted
_imagingft.c:502: error: expected ‘{’ at end of input
error: command 'gcc' failed with exit status 1
----------------------------------------
Command /usr/local/bin/python -c "import setuptools;__file__='/home/acresearch/downloads/py-modules/PIL/build/PIL/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-tHfjOz-record/install-record.txt failed with error code 1 in /home/acresearch/downloads/py-modules/PIL/build/PIL
Storing complete log in /root/.pip/pip.log
I already checked if python-devel, libjpg and libpng are already installed (mentioned as possible resolution on some links I've read) and yes,they are installed. However, error still occurs.
Any ideas on how to resolve this? Thanks in advance!
Upvotes: 0
Views: 1221
Reputation: 11
hello I had the same problem is solved by first installing this
yum install gcc
now you can install PIL with
pip install PIL
Upvotes: 1