Finding tcltk when building Python on Windows

Chris ceball at users.sourceforge.net
Thu Sep 11 22:46:57 CEST 2008


Hi,

I'm trying to build Python on Windows using Visual Studio 2005. I have
no trouble compiling tcl/tk 8.5, but when I subsequently build Python
it doesn't find tcl/tk (I get a message about being unable to find
tcl.h).

I'm using the source distribution of Python 2.5.2, not the svn
version. I'm trying to follow the instructions in PCbuild8/readme.txt,
but I'm not sure I understand them correctly. Here is the part of the
text that I think I might have misunderstood:

"""
The following subprojects [including Tkinter] will generally NOT build
out of the box.  They wrap code Python doesn't control, and you'll
need to download the base packages first and unpack them into siblings
of PCbuilds's parent directory; for example, if your PCbuild is
.......\dist\src\PCbuild\, unpack into new subdirectories of dist\.
"""

If I have extracted the Python source archive to c:\Python-2.5.2\,
then my understanding is that I should extract the tcl and tk source
archives to c:\tcl-8.5.4\ and c:\tk-8.5.4\, respectively. Then, when I
build and install tcl and tk, their output is c:\tcltk\ (because the
instructions say to pass "INSTALLDIR=..\..\tcltk" when building). This
is then supposed to be found when I build Python. But tcl/tk isn't
found, so I assume I didn't do the right thing here.

I feel a bit stupid! I also can't find any explicit instructions for
building Python with tcl/tk support using Visual Studio by searching
the web.

Thanks for any help,
Chris





More information about the Python-list mailing list