Building Python with non-standard tcl/tk support

Westley Martínez anikom15 at gmail.com
Sat Mar 3 19:17:40 CET 2012


On Sat, Mar 03, 2012 at 05:36:52PM +0000, Steven D'Aprano wrote:
> I'm trying to re-build Python 3.2 with support for TCL/TK 8.5, but when I 
> run "make" I get this message:
> 
> Failed to build these modules:
> _tkinter
> 
> and after installing 3.2 I still have this:
> 
> >>> import _tkinter
> >>> _tkinter.TK_VERSION
> '8.4'
> 
> 
> What do I need to do to have Python 3.2 use tcl/tk 8.5?
> 
> 
> I have installed tcl/tk 8.5.11 from source, and the binaries are here:
> 
> /usr/local/lib/libtcl8.5.so
> /usr/local/lib/libtk8.5.so
> 
> 
> In the Python 3.2 source, I do the usual:
> 
> ./configure
> make
> sudo make altinstall
> 
> 
> (altinstall to avoid nuking the system Python)

That's all you should have to do, but on my system the Tk libraries are
in /usr/lib not /usr/local/lib.  So try doing ./configure
--prefix=/usr/local or try setting LDFLAGS to "-L/usr/local/lib".



More information about the Python-list mailing list