Help uninstalling/installing Python 2.4

Discussion in 'Python' started by Baggs, Jan 8, 2005.

  1. Baggs

    Baggs Guest

    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.
    Baggs, Jan 8, 2005
    #1
    1. Advertising

  2. Baggs

    Craig Ringer Guest

    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
    Craig Ringer, Jan 8, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Price
    Replies:
    0
    Views:
    255
    Matt Price
    Oct 27, 2004
  2. Matt Price
    Replies:
    0
    Views:
    270
    Matt Price
    Oct 27, 2004
  3. Jeffrey A. Zelt
    Replies:
    0
    Views:
    378
    Jeffrey A. Zelt
    Feb 28, 2005
  4. Pete

    Uninstalling Python

    Pete, Mar 30, 2006, in forum: Python
    Replies:
    7
    Views:
    4,790
    Dennis Lee Bieber
    Mar 30, 2006
  5. Chris Brand

    Uninstalling Ruby 1.8.7 Help

    Chris Brand, Aug 26, 2008, in forum: Ruby
    Replies:
    5
    Views:
    168
    Chris Brand
    Aug 28, 2008
Loading...

Share This Page