Hello,

I'm trying to run some python code that makes use of tk and have hit the error -

File "/sw/lib/python2.2/lib-tk/Tkinter.py", line 35, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: Failure linking new module

That error originally came when I was using the prebuilt tcltk 8.4.1 and python 2.2.3-23, so I tried rebuilding from source.

When compiling I hit -

building '_tkinter' extension
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c: In function `Merge':
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c:351: warning: passing arg 2 of `Tcl_Merge' from incompatible pointer type
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c: In function `Split':
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c:383: warning: passing arg 4 of `Tcl_SplitList' from incompatible pointer type
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c: In function `Tkapp_Call':
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c:627: warning: initialization discards qualifiers from pointer target type
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c: In function `SetVar':
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c:935: warning: assignment discards qualifiers from pointer target type
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c:947: warning: assignment discards qualifiers from pointer target type
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c: In function `GetVar':
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c:988: warning: assignment discards qualifiers from pointer target type
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c:991: warning: assignment discards qualifiers from pointer target type
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c: In function `Tkapp_SplitList':
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c:1198: warning: passing arg 4 of `Tcl_SplitList' from incompatible pointer type
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c: In function `Tkapp_CreateCommand':
/sw/src/python22-2.2.3-23/Python-2.2.3/Modules/_tkinter.c:1364: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible pointer type
ld: warning -L: directory name (/usr/local/lib) does not exist


Clearly it needs to be looking in /sw/lib, but I haven't yet found where this is being set. Can anyone give me some help on this?

Thanks,

Jim Nettles

Reply via email to