Configuring IDLE on Linux

S

Satya Kiran

Hello,
I have upgraded to Python2.4 on my Red Hat 9.0 Linux box.
I want to work with IDLE and ran a search to check it's presence.
Here is what I get.

[root@localhost bin]# find / -iname idlelib
/usr/local/lib/python2.4/idlelib

[root@localhost bin]# cd /usr/local/lib/python2.4/idlelib
[root@localhost idlelib]# python PyShell.py
** IDLE can't import Tkinter. Your Python may not be configured for Tk. **

How do I resolve this and get IDLE working?

thanks in advance,
Kiran Satya
 
A

Adonis

Satya said:
Hello,
I have upgraded to Python2.4 on my Red Hat 9.0 Linux box.
I want to work with IDLE and ran a search to check it's presence.
Here is what I get.

[root@localhost bin]# find / -iname idlelib
/usr/local/lib/python2.4/idlelib

[root@localhost bin]# cd /usr/local/lib/python2.4/idlelib
[root@localhost idlelib]# python PyShell.py
** IDLE can't import Tkinter. Your Python may not be configured for Tk. **

How do I resolve this and get IDLE working?

thanks in advance,
Kiran Satya

You must have the Tk libraries present in your system for Python to
compile Tkinter. Go to your distribution's site and try to see if they
offer a TCL/TK package and install it (being that it is Redhat they most
definitely must have one). Then recompile Python.

Hope this helps.

Adonis
 
B

Ben C

Satya said:
Hello,
I have upgraded to Python2.4 on my Red Hat 9.0 Linux box.
I want to work with IDLE and ran a search to check it's presence.
Here is what I get.

[root@localhost bin]# find / -iname idlelib
/usr/local/lib/python2.4/idlelib

[root@localhost bin]# cd /usr/local/lib/python2.4/idlelib
[root@localhost idlelib]# python PyShell.py
** IDLE can't import Tkinter. Your Python may not be configured for Tk. **

How do I resolve this and get IDLE working?

thanks in advance,
Kiran Satya

You must have the Tk libraries present in your system for Python to
compile Tkinter. Go to your distribution's site and try to see if they
offer a TCL/TK package and install it (being that it is Redhat they most
definitely must have one). Then recompile Python.

This is exactly right, on a SUSE system (at least) it's the tk-devel and
tcl-devel packages you need to have installed, because you're building
Python and it needs to link against those things, not just use them. So
although tcl/tk on its own it usually installed by default, you don't
always get those -devel packages in a default setup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top