Compiling Python with Tkinter

johngrayson42 johngrayson at home.com
Mon Dec 17 13:00:23 CET 2001


WhoaH!!

Slow down there, I think the problem is much simpler and
has nothing to do with the platform, X or what day it is...

X11/Xlib.h *is* as you've correctly stated part of the X
distribution, but that has nothing to do with compiling 
Tcl/Tk on WinXXX, since Xlib.h is in the Tk distribution.
Compiling for WinXXX requires you to edit the project
files in the PCBuild directory, and is generally straight
forward.

Now, if you're compiling for UNIX/Linux you've got to have
X installed so that the include and lib files end up in the 
'normal'locations and then you'll have to adjust the Setup.dist 
file in Modules to reflect the proper include and lib 
directories. Tkinter is not compiled by default, so you have
to uncomment several lines in the file. Save it as Setup and run
makesetup. Tcl/Tk must be installed or compiled/installed 
before you compile Python.

In general, compiling a Tkinter-capable Python should take 
30 minutes on a new UNIX/Linux platform:

Install Tcl, Tk and Python as peers of each other (same with Tix)
run configure in Python
make and make install Tcl  (unless you're using binary dist)make and
make install Tk   (unless you're using binary dist)
edit Setup
make and make install Python

Now, you can proceed to make PIL. Follow the instructions
in the README  (but then nobody reads those...  :-)    )

The only machine that ever caused me a problem was a UniSys
multiprocessor which required some code changes to compile,
but that is another story...

    Good Luck!

          John






More information about the Python-list mailing list