Red Hat Bugzilla – Bug 142084
Python is not configured for Tk
Last modified: 2007-11-30 17:10:56 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001
Description of problem:
Python won't work with the Redhat version of Tk.
[jeffs@black ~]$ alias idle=/usr/lib/python2.3/idlelib/idle
[jeffs@black ~]$ idle
** IDLE can't import Tkinter. Your Python may not be configured for
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Actual Results: ** IDLE can't import Tkinter. Your Python may not be
configured for Tk. **
Expected Results: IDLE should start
I found the following conversation at
I had another look and I think I see your problem... basically I
/usr/local build of Tcl/Tk so that python 2.3 would 'find' the redhat
so I ran configure then make and right at the end of the make:-
building '_tkinter' extension
gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC
-fno-strict-aliasing -DWITH_APPINIT=1 -I/usr/X11R6/include -I.
#error "unsupported Tcl configuration"
warning: passing arg 1 of `Tcl_NewUnicodeObj' from incompatible
warning: passing arg 1 of `PyUnicodeUCS2_FromUnicode' from
incompatible pointer type
So it looks like the Tcl/Tk version that comes with RedHat 9 (it
apears to be
Tk 8.3.5 accordfing to the tk.h file in /usr/include) is not
the Tkinter in Python 2.3. This means _tkinter.so is not built and Tkinter
will not work!
On way round this little problem would be to build your own Tcl/Tk
(thats what I did) Not only will you get a working Python 2.3 but you
new options in Tk 8.4 too all for an extra couple of downloads and
mins of 'work'.
Do you have the tkinter package installed?
[jeffs@black ~]$ python -V
[jeffs@black ~]$ !rpm
rpm -q tkinter
[jeffs@black ~]$ find /usr -iname "tkinter.py*" -print
find: /usr/share/ssl/CA: Permission denied
Installed python 2.3.4-11 and tkinter 2.3.4-11 on an amd64 machine and
tkinter got properly loaded.
I'll repeat the tests once I have an x86 machine available, but it
looks ok so far...
Since there are insufficient details provided in this report for us to
investigate the issue further, and we have not received the feedback we
requested, we will assume the problem was not reproduceable or has been fixed in
a later update for this product. If this has not been fixed in newer releases,
please feel free to re-open the bug report and provide more information that
would help us fix it.