[Q] How to use IDLE in redhat
Cliff Wells
logiplexsoftware at earthlink.net
Fri Jan 11 20:22:10 EST 2002
On Fri, 11 Jan 2002 17:08:31 -0800
Cliff Wells wrote:
> On Fri, 11 Jan 2002 15:46:44 -0600
> Young-Jin Lee wrote:
>
> > I tried just "idle" at my home directory, but to my dismay, it didn't
> work.
> > I got
> > Traceback (innermost last):
> > File "/usr/lib/python2.2/Tools/idle/idle", line 5, in ?
> > from idlelib import idlelib
> > ImportError: No module named idlelib
> >
> > I also tried "idle.py" at my home directory again, but it didn't work
> > either.
> > I got
> > Traceback (innermost last):
> > File "/usr/lib/python2.2/Tools/idle/idle/idle.py", line 3, in ?
> > import PyShell
> > File "/usr/lib/python2.2/Tools/idle/idle/PyShell.py", line 8, in ?
> > import warnings
> > ImportError: No module named warnings
> >
> > Moreover, the "/usr/lib/python2.x/Tools/idle" directory is on my path.
> >
>
> Remove that from your path and try again. You want to run the idle that
> resides in /usr/bin, _not_ /usr/lib/python2.x/Tools/idle.
BTW, in case you're wondering why this is, if you look at /usr/bin/idle
you'll see that all it does is
#!/bin/bash
exec /usr/bin/python2 /usr/lib/python2.1/Tools/idle/idle.py
However, the difference between running this and the one in
/usr/lib/python2.1/Tools/idle/ is that it gets run with python2, whereas
running the one under Tools/idle/ gets run with python, which under RedHat
is Python 1.5.2.
--
Cliff Wells
Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308
(800) 735-0555 x308
More information about the Python-list
mailing list