Help! PIL compiled into Tkinter in 1.5.2 (Tricky Bits!)

Fredrik Lundh fredrik at pythonware.com
Wed Apr 14 11:23:19 EDT 1999


frank <frank at ned.dem.csiro.au> wrote:
> The Setup.in file lists the following 2 lines:
> # *** Uncomment and edit for PIL (TkImaging) extension only:
> #  -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \

1. unpack Imaging-1.0b1.tar.gz on the same level as
you unpacked Python.

$ ls -l
drwxr-xr-x   8 eff      effie       1024 Mar 29 11:11 Imaging-1.0b1
drwxr-xr-x  15 eff      effie       1024 Mar 25 12:54 Python-1.5.2b2
drwxr-xr-x  14 eff      effie        512 Mar 25 10:32 tcl8.0.5
drwxr-xr-x  16 eff      effie        512 Mar 25 10:40 tk8.0.5

2. build a standard version of Python (preferrably with dynamically
loaded extensions)

3. build PIL according to the instructions in Imaging-1.0b1/README.

4. in Python-1.5.2/Modules/Setup, change the Tkinter
section to something like (this assumes that you've 

# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
        -I/usr/local/include \
# *** Uncomment and edit to reflect where your X11 header files are:
        -I/usr/include/X11 \
# *** Uncomment and edit for PIL (TkImaging) extension only:
        -DWITH_PIL -I../../Imaging-1.0b1/libImaging ../../Imaging-1.0b1/Tk/tkImaging.c \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
        -L/usr/local/lib \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
        -ltk8.0 -ltcl8.0 \
# *** Uncomment and edit to reflect where your X11 libraries are:
        -L/usr/lib \
# *** Always uncomment this; X11 libraries to link with:
        -lX11

5. rebuild Python.

(works for me, at least)

</F>





More information about the Python-list mailing list