Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Help uninstalling/installing Python 2.4

Reply
Thread Tools

Help uninstalling/installing Python 2.4

 
 
Baggs
Guest
Posts: n/a
 
      01-08-2005
Guys/Gals

I've messed up my Python 2.4 install. I'm really new to Python (and
Linux for that matter) and really wanted to try Python out.

I have mandrake 10.1. The first thing I did was uninstalled via rpm
Python 2.3 and Tkinter 8.3 (I now realize that was a mistake, since I
could have both version installed with no problems). I then downloaded
Python2.4 ran ./configure make and make install... voila I had Python
installed...

Tk calls did not work, the output from Python when running a program
stated that I probably did not have TK installed. I got and installed
TK 8.4 and the problem persisted (I know I should have written down the
exact error, but I didn't... but the story gets worse!)

Here is the really stupid part... I figured if I uninstalled and
re-installed everything would be ok.... the bad part is I could not find
an uninstaller for TK or Python, so I just searched and delted the files
and directorys from /usr/local.... when I re-installed I still have
problems.. everything installs ok, but now I get the following errors
with Python...

bash: /usr/bin/python: No such file or directory

The interesting thing is the python executable is in /usr/local/bin

when I go to /usr/local/bin and type ./python I get

Python 2.4 (#6, Jan 7 2005, 18:44:57)
[GCC 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "/etc/pythonrc.py", line 2, in ?
import readline
ImportError: No module named readline

I think some paths are screwed up.. can someone take pity on me and give
me a hand.

Thanks
Darrin

PS -- if you want to mail me directly remove the --spamreallysucks-- in
my email address.


 
Reply With Quote
 
 
 
 
Craig Ringer
Guest
Posts: n/a
 
      01-08-2005
On Sat, 2005-01-08 at 08:08, Baggs wrote:

> Tk calls did not work, the output from Python when running a program
> stated that I probably did not have TK installed. I got and installed
> TK 8.4 and the problem persisted (I know I should have written down the
> exact error, but I didn't... but the story gets worse!)


You probably didn't have the -devel packages for Tcl and Tk installed,
so Python would've decided you didn't have Tk and not built tkinter
support. Chances are if you install the devel packages and recompile
Python, it'll work fine.

> when I re-installed I still have
> problems.. everything installs ok, but now I get the following errors
> with Python...
>
> bash: /usr/bin/python: No such file or directory


Is that when you run a script, or when you type 'python' in your shell?
If the former, make sure you write your scripts with a #! like this:

#!/usr/bin/env python

not

#!/usr/bin/python

That way, the right python will get run so long as it's on your path -
it doesn't have to be in /usr/bin.

If the error is when typing 'python' on the command line, ensure you
have no aliases for the name 'python' hanging around ('alias python' to
find out). Also check what is actually being run with 'which python' and
see if it's a wrapper script that calls /usr/bin/python.

> when I go to /usr/local/bin and type ./python I get
>
> Python 2.4 (#6, Jan 7 2005, 18:44:57)
> [GCC 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> Traceback (most recent call last):
> File "/etc/pythonrc.py", line 2, in ?
> import readline
> ImportError: No module named readline
>
> I think some paths are screwed up.. can someone take pity on me and give
> me a hand.


I'd say that'll be the same as with Tkinter - you probably didn't have
the GNU readline development headers installed, so Python disabled
readline support when it was compiled. That's just a guess, but seems
pretty likely.

--
Craig Ringer

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [Python-Dev] [python-committers] [RELEASED] Python 3.2 rc 1 R. David Murray Python 0 01-17-2011 02:23 PM
Re: [Python-Dev] [python-committers] [RELEASED] Python 3.2 rc 1 Senthil Kumaran Python 0 01-17-2011 10:31 AM
Re: [Python-Dev] [Python-3000] RELEASED Python 2.6a1 and 3.0a3 Martin v. L÷wis Python 0 03-01-2008 10:51 PM
Re: [Python-Dev] [Python-3000] RELEASED Python 2.6a1 and 3.0a3 Paul Moore Python 0 03-01-2008 10:39 PM
Searching comp.lang.python/python-list@python.org (was: UTF-8) skip@pobox.com Python 0 03-10-2007 02:50 PM



Advertisments