Bug 142084

Summary: Python is not configured for Tk
Product: [Fedora] Fedora Reporter: Jeff Silverman <jeffs>
Component: pythonAssignee: Mihai Ibanescu <mihai.ibanescu>
Status: CLOSED CANTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: jeff, katzj
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-30 16:03:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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
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 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
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 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.