Bug 142084 - Python is not configured for Tk
Python is not configured for Tk
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
3
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Mihai Ibanescu
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-07 01:47 EST by Jeff Silverman
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-30 12:03:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Silverman 2004-12-07 01:47:01 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001
Firefox/0.10.1

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):
2.3.4-11

How reproducible:
Always

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

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
http://groups.yahoo.com/group/python-list/message/108348



Rob,

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/./Include
-I/usr/python/Python23/TEST111/Python-2.3/Include
-I/usr/python/Python23/TEST111/Python-2.3 -c
/usr/python/Python23/TEST111/Python-2.3/Modules/_tkinter.c -o
build/temp.linux-i686-2.3/_tkinter.o
/usr/python/Python23/TEST111/Python-2.3/Modules/_tkinter.c:96:2:
#error "unsupported Tcl configuration"
/usr/python/Python23/TEST111/Python-2.3/Modules/_tkinter.c: In
function `AsObj':
/usr/python/Python23/TEST111/Python-2.3/Modules/_tkinter.c:947:
warning: passing arg 1 of `Tcl_NewUnicodeObj' from incompatible
pointer type
/usr/python/Python23/TEST111/Python-2.3/Modules/_tkinter.c: In
function `FromObj':
/usr/python/Python23/TEST111/Python-2.3/Modules/_tkinter.c:1073:
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 08:50:22 EST
Do you have the tkinter package installed?
Comment 2 Jeff Silverman 2004-12-15 00:13:09 EST
[jeffs@black ~]$ python -V
Python 2.3.4
[jeffs@black ~]$ !rpm
rpm -q tkinter
tkinter-2.3.4-11
[jeffs@black ~]$
[jeffs@black ~]$ find /usr -iname "tkinter.py*" -print
find: /usr/share/ssl/CA: Permission denied
/usr/lib/ooo-1.1/program/python-core-2.2.2/lib/lib-tk/Tkinter.py
/usr/lib/python2.3/lib-tk/Tkinter.py
/usr/lib/python2.3/lib-tk/Tkinter.pyc
/usr/lib/python2.3/lib-tk/Tkinter.pyo
[jeffs@black ~]$
Comment 3 Mihai Ibanescu 2004-12-15 00:43:15 EST
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 12:03:52 EDT
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.