Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Incorrect Python accidentally installed

  1. #1
    Join Date
    Oct 2007
    Beans
    27

    Incorrect Python accidentally installed

    I was trying to install a scientific package and Python-2.5.4 was accidentally installed.

    Now every time I run python Python 2.5.4 is run

    I still have python2.7 installed in /usr/bin and in this bin ls -ls python*
    gives the output
    python -> python2.7

    I have no idea what I have done and would like to uninstall phython2.5.4

    Does anyone know what I should do?
    If I knew what I was doing then it would not be research
    Networking Xp and Ubuntu
    Using Lenovo M57 6075

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Incorrect Python accidentally installed

    That link looks correct. Python should be linked to python 2.7.
    Normally you can have many versions of python installed but only one is linked to python and one to python3.
    Then you run the other versions by being explicit in version number.
    Did somehow 2.7 get overwritten. That should not normally happen.

    My python links.
    Code:
    fred@fred-Precise:~$ cd /usr/bin
    fred@fred-Precise:/usr/bin$ ls -ls python*
       0 lrwxrwxrwx 1 root root       9 Jun 18 12:26 python -> python2.7
       0 lrwxrwxrwx 1 root root       9 Jun 18 12:26 python2 -> python2.7
    2920 -rwxr-xr-x 1 root root 2989496 Sep 26 15:29 python2.7
       4 -rwxr-xr-x 1 root root    1652 Sep 26 15:28 python2.7-config
       0 lrwxrwxrwx 1 root root      16 Jun 18 12:26 python2-config -> python2.7-config
       0 lrwxrwxrwx 1 root root       9 Apr 10 16:12 python3 -> python3.2
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #3
    Join Date
    Oct 2007
    Beans
    27

    Re: Incorrect Python accidentally installed

    Thanks for the reply
    1 I think (am almost sure) that 2.7 is not overwritten
    2 I would like to use the terminal so that when I type python I use pyhton 2.7. Is there an easy way to reset the links
    3 I do not know how to get python links (like you did) (Sorry I am ignorant of some Linux)
    If I knew what I was doing then it would not be research
    Networking Xp and Ubuntu
    Using Lenovo M57 6075

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Incorrect Python accidentally installed

    I posted the commands with my output above.
    cd /usr/bin
    ls -ls python*

    Then just copy & paste from terminal. Use code tags easily from advanced editor # icon.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    Oct 2007
    Beans
    27

    Re: Incorrect Python accidentally installed

    Ops - how embassaring I did not read your code properly

    lpa@CLINO:/etc$ cd /usr/bin
    lpa@CLINO:/usr/bin$ ls -ls python*
    0 lrwxrwxrwx 1 root root 9 Jun 19 03:26 python -> python2.7
    0 lrwxrwxrwx 1 root root 9 Jun 19 03:26 python2 -> python2.7
    2920 -rwxr-xr-x 1 root root 2989496 Sep 27 06:29 python2.7
    4 -rwxr-xr-x 1 root root 1652 Sep 27 06:28 python2.7-config
    6172 -rwxr-xr-x 1 root root 6318332 Sep 27 05:43 python2.7-dbg
    4 -rwxr-xr-x 1 root root 1656 Sep 27 06:29 python2.7-dbg-config
    0 lrwxrwxrwx 1 root root 16 Jun 19 03:26 python2-config -> python2.7-config
    0 lrwxrwxrwx 1 root root 13 Jun 19 03:26 python2-dbg -> python2.7-dbg
    0 lrwxrwxrwx 1 root root 20 Jun 19 03:26 python2-dbg-config -> python2.7-dbg-config
    0 lrwxrwxrwx 1 root root 16 Jun 19 03:26 python-config -> python2.7-config
    0 lrwxrwxrwx 1 root root 13 Jun 19 03:26 python-dbg -> python2.7-dbg
    0 lrwxrwxrwx 1 root root 20 Jun 19 03:26 python-dbg-config -> python2.7-dbg-config
    I am sorry to be dense but can you tell me how to change the link (is it called the symbolic link) to run the 2.7 version. When I run in the terminal (at present) I get

    lpa@CLINO:/usr/bin$ python
    Python 2.5.4 (r254:67916, Sep 27 2012, 13:12:30)
    [GCC 4.6.3] on linux3
    If I knew what I was doing then it would not be research
    Networking Xp and Ubuntu
    Using Lenovo M57 6075

  6. #6
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Incorrect Python accidentally installed

    All the links are saying they go to 2.7??
    So I do not know how running python gives you the 2.5 version.

    I prefer synaptic as it shows more. But many parts of Ubuntu need the correct python version.
    Can you run this:
    sudo apt-get install synaptic
    Then from gui, search for synaptic and run that.
    In synaptic search, put in python. What version(s) does it show. And for 2.7 click on reinstall and run that.
    If not we can run from command line if necessary.

    I found this in my notes. May be better?
    http://ubuntuforums.org/showthread.php?t=2110364
    python --version
    sudo update-alternatives --config python
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  7. #7
    Join Date
    Oct 2007
    Beans
    27

    Re: Incorrect Python accidentally installed

    Thanks again for the help

    I will wait till the weekend to try this and let you know what the outcome was.
    If I knew what I was doing then it would not be research
    Networking Xp and Ubuntu
    Using Lenovo M57 6075

  8. #8
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,499
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Incorrect Python accidentally installed

    how exactly did you accidentally install python 2.5.4?
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

  9. #9
    Join Date
    Oct 2007
    Beans
    27

    Re: Incorrect Python accidentally installed

    Vaphell - I was installing a scientific package from the web and did not check it carefully enough. This packae automatically intalled python 2.5.4 - where I was not sure
    If I knew what I was doing then it would not be research
    Networking Xp and Ubuntu
    Using Lenovo M57 6075

  10. #10
    Join Date
    Oct 2007
    Beans
    27

    Re: Incorrect Python accidentally installed

    OK I am now geting somewhere.

    I finally looked at PATH
    lpa@CLINO:/usr/bin$ echo $PATH
    /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    So I found python 2.5.4 installed in /usr/local/bin
    lpa@CLINO:/usr/local/bin$ ls -ls python*
    5120 -rwxr-xr-x 2 root root 5242800 Sep 27 2012 python
    5120 -rwxr-xr-x 2 root root 5242800 Sep 27 2012 python2.5
    4 -rwxr-xr-x 1 root root 1424 Sep 27 2012 python2.5-config
    0 lrwxrwxrwx 1 root root 16 Sep 27 2012 python-config -> python2.5-config


    lpa@CLINO:/usr/local/bin$ ls
    bsp_virtual ncgen pyro-genguid pyro-rns python2.5 task_manager
    f2py pydoc pyro-ns pyro-wxnsc python2.5-config tviewer
    idle pyro-es pyro-nsc pyro-xnsc python-config
    ncdump pyro-esd pyro-nsd python smtpd.py
    AND when I am in /usr/bin and run python2.7

    lpa@CLINO:/usr/bin$ python2.7
    Python 2.7.3 (default, Sep 26 2013, 20:03:06)
    [GCC 4.6.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    SO

    I think that I need to disable the links in /usr/local/bin and I will be OK

    ANY Comments

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •