Bug 142084 - Python is not configured for Tk
Summary: Python is not configured for Tk
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 3
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Mihai Ibanescu
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-12-07 06:47 UTC by Jeff Silverman
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2005-09-30 16:03:52 UTC

Attachments (Terms of Use)

Description Jeff Silverman 2004-12-07 06:47:01 UTC
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
Tk. **
[jeffs@black ~]$

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.alias idle=/usr/lib/python2.3/idlelib/idle

Actual Results:  ** IDLE can't import Tkinter.  Your Python may not be
configured for Tk. **

Expected Results:  IDLE should start 

Additional info:

I found the following conversation at


I had another look and I think I see your problem... basically I
removed the
/usr/local build of Tcl/Tk so that python 2.3 would 'find' the redhat
9 build
of Tcl/Tk....

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.
-I/usr/python/Python23/TEST111/Python-2.3 -c
/usr/python/Python23/TEST111/Python-2.3/Modules/_tkinter.c -o
#error "unsupported Tcl configuration"
/usr/python/Python23/TEST111/Python-2.3/Modules/_tkinter.c: In
function `AsObj':
warning: passing arg 1 of `Tcl_NewUnicodeObj' from incompatible
pointer type
/usr/python/Python23/TEST111/Python-2.3/Modules/_tkinter.c: In
function `FromObj':
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
compatible with
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
get the
new options in Tk 8.4 too all for an extra couple of downloads and
about 30
mins of 'work'.

Comment 1 Mihai Ibanescu 2004-12-14 13:50:22 UTC
Do you have the tkinter package installed?

Comment 2 Jeff Silverman 2004-12-15 05:13:09 UTC
[jeffs@black ~]$ python -V
Python 2.3.4
[jeffs@black ~]$ !rpm
rpm -q tkinter
[jeffs@black ~]$
[jeffs@black ~]$ find /usr -iname "tkinter.py*" -print
find: /usr/share/ssl/CA: Permission denied
[jeffs@black ~]$

Comment 3 Mihai Ibanescu 2004-12-15 05:43:15 UTC
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...

Comment 4 Mihai Ibanescu 2005-09-30 16:03:52 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.