Building Python with non-standard tcl/tk support

Westley Martínez anikom15 at gmail.com
Sun Mar 4 02:06:39 CET 2012


On Sun, Mar 04, 2012 at 12:50:53AM +0000, Steven D'Aprano wrote:
> Okay, now I'm making progress... if I remove the previously existing 
> _tkinter in lib-dynload, and re-run "make", I get something new:
> 
> building '_tkinter' extension
> gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -
> Wstrict-prototypes -DWITH_APPINIT=1 -I/usr/X11/include -IInclude -I. -I./
> Include -I/usr/local/include -I/tmp/Python-3.2.2 -c /tmp/Python-3.2.2/
> Modules/_tkinter.c -o build/temp.linux-i686-3.2/tmp/Python-3.2.2/Modules/
> _tkinter.o
> gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -
> Wstrict-prototypes -DWITH_APPINIT=1 -I/usr/X11/include -IInclude -I. -I./
> Include -I/usr/local/include -I/tmp/Python-3.2.2 -c /tmp/Python-3.2.2/
> Modules/tkappinit.c -o build/temp.linux-i686-3.2/tmp/Python-3.2.2/Modules/
> tkappinit.o
> gcc -pthread -shared build/temp.linux-i686-3.2/tmp/Python-3.2.2/Modules/
> _tkinter.o build/temp.linux-i686-3.2/tmp/Python-3.2.2/Modules/tkappinit.o 
> -L/usr/X11/lib -L/usr/local/lib -ltk8.5 -ltcl8.5 -lX11 -o build/lib.linux-
> i686-3.2/_tkinter.cpython-32m.so
> *** WARNING: renaming "_tkinter" since importing it failed: libtk8.5.so: 
> cannot open shared object file: No such file or directory
> 
> Failed to build these modules:
> _tkinter

Verify that libtk8.5.so exists in /usr/local/lib and verify you have
read permission.

You could try to write a Tk C program (or find one) and try building
that with cc -L/usr/X11/lib -L/usr/local/lib -ltk8.5 -ltcl8.5 -lX11 .
If that works then your Tk libraries are installed properly and
something is wonky with your Python build.



More information about the Python-list mailing list