Results 1 to 6 of 6

Thread: I'm looking for a security way to uninstall a python version. Somebody can help ??

  1. #1
    Join Date
    Feb 2015
    Location
    Brasil
    Beans
    31
    Distro
    Ubuntu 14.04 Trusty Tahr

    I'm looking for a security way to uninstall a python version. Somebody can help ??

    Hi everbody

    I'm using ubuntu 14.04 LTS and recently I install a IDLE who change my python version. I saw in the internet some tips and I discovered the directory /usr/bin. It have all version of python install in my computer.

    For my surprise in this directory there two verions of the python now...2.7.6 an 3.4.0...
    Can I unistall a version of python without damage my ubuntu system. I saw in the internet that some guys unistall python with the comand remove and after that there are so many problems with the system.

    If Itś dangerous unistall the version 2 or 3. Can I change a version default ?? So when I put in the terminal python3 to run a version3 and if necessary when put python2 to run the version2.

    I access diferent version using the comand line in ther terminal: /usr/bin/python3 (run version 3.4.0) and python (run version 2.7.6)

    ps: (sorry for mistakes in the write my english is not the best)

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

    Re: I'm looking for a security way to uninstall a python version. Somebody can help ?

    Do not uninstall either of the default installs of python.
    Ubuntu is in the process of converting from 2 to 3 and soon will be python3 as default but python2 will still be in repository.
    But many scripts in Ubuntu require python.

    As you mention python link is to python2 so running python defaults to 2.
    If you want 3 just use python3
    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
    Feb 2015
    Location
    Brasil
    Beans
    31
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: I'm looking for a security way to uninstall a python version. Somebody can help ?

    Hi oldfred...

    I understood that ubuntu depends of python and unistall a wrong file maybe damage the system...so I will maintain the two versions.

    do you know how I change the link to execute python3 in terminal ??? Today I write usr/bin/python3 in the terminal for execute the version 3.4.0..


    thanks for the tips.

  4. #4
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,952

    Re: I'm looking for a security way to uninstall a python version. Somebody can help ?

    Quote Originally Posted by fbio7 View Post
    do you know how I change the link to execute python3 in terminal ??? Today I write usr/bin/python3 in the terminal for execute the version 3.4.0..
    You don't change anything. /usr/bin/python3 is the proper way to launch the Python 3 interpreter in a terminal.

    See https://www.python.org/dev/peps/pep-0394/ :
    • python2 will refer to some version of Python 2.x.
    • python3 will refer to some version of Python 3.x.
    • for the time being, all distributions should ensure that python refers to the same target as python2
    Last edited by ian-weisser; March 4th, 2015 at 02:20 PM.

  5. #5
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,824
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: I'm looking for a security way to uninstall a python version. Somebody can help ?

    On the command line (but not on the first line (magic number) of a script) you can skip the /usr/bin/ bit. Just the command python3 will do.

    I think (not really sure about this) that all Ubuntu components using python3 explicitly call python3, whereas components relying on python2 may simply call python as their devs didn't consider the possible existence of an incompatible python3. So making python point to python3 will break things relying on python2.

  6. #6
    Join Date
    Feb 2015
    Location
    Brasil
    Beans
    31
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: I'm looking for a security way to uninstall a python version. Somebody can help ?

    Hum..ok guys. nothing change.

    Thank you very much for answer my questions...

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
  •