Unable to install Python Imaging Library

peter.mosley at talk21.com peter.mosley at talk21.com
Sun Dec 18 16:04:03 EST 2005


A few weeks ago I asked for advice about which GUI toolkit I should
learn, and receved several helpful answers.  In the end I went with
Tkinter.  This was because a) it was already installed on the machines
I am most likley to use, b) it is cross platform, and c) it was not as
complex as PyGtk - which I tried and was totally unable to decipher.

I am now at the point of trying to import the Python Imaging Library,
and I have reached a total standstill.  I downloaded a copy of Python
Imaging Library 1.1.5 Source Kit from the site
http://www.pythonware.com/products/pil/. There did not seem to be any
prebuilt binaries suitable for my system (Python 2.2/Fedora Core 1), so
I loaded the source code.

The instructions said to try 'python setup.py install', followed by
more detailed instructions 'If you prefer to know what you're doing'. I
do prefer to know what I'm doing, but couldn't understand the following
instructions.  So I tried the simple route, but it failed with the
output shown below.

I have absolutely no idea how to proceed.  Can anyone point me in the
right direction to get over this hurdle?


gcc -DNDEBUG -O2 -g -pipe -march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC
-fPIC -I/usr/include/freetype2 -IlibImaging -I/usr/include
-I/usr/local/include -I/usr/include/python2.2 -c _imagingtk.c -o
build/temp.linux-i686-2.2/_imagingtk.o
_imagingtk.c:20:16: tk.h: No such file or directory
_imagingtk.c:23: error: syntax error before '*' token
_imagingtk.c:31: error: syntax error before "Tcl_Interp"
_imagingtk.c:31: warning: no semicolon at end of struct or union
_imagingtk.c:32: warning: data definition has no type or storage class
_imagingtk.c: In function `_tkinit':
_imagingtk.c:37: error: `Tcl_Interp' undeclared (first use in this
function)
_imagingtk.c:37: error: (Each undeclared identifier is reported only
once
_imagingtk.c:37: error: for each function it appears in.)
_imagingtk.c:37: error: `interp' undeclared (first use in this
function)
_imagingtk.c:45: error: syntax error before ')' token
_imagingtk.c:50: error: `app' undeclared (first use in this function)
_imagingtk.c:50: error: syntax error before ')' token
_imagingtk.c: At top level:
_imagingtk.c:55: warning: parameter names (without types) in function
declaration
_imagingtk.c:55: error: conflicting types for `TkImaging_Init'
_imagingtk.c:23: error: previous declaration of `TkImaging_Init'
_imagingtk.c:55: warning: data definition has no type or storage class
_imagingtk.c:57: error: syntax error before '&' token
error: command 'gcc' failed with exit status 1




More information about the Python-list mailing list