Ubuntu – how to update python version on ubuntu 14.10

pythonpython-2.7python3

I'm trying to figure out what version of python i have installed, and also upgrade it to the latest.

When I go to a command prompt and check, it looks like I have an old version of python installed.

me@linuxdev:~$ python
Python 2.7.8 (default, Oct 20 2014, 15:05:19) 
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

But then when i launch the sofware center in Ubuntu and check the "installed" section, under "developer tools" i see an entry for "Python (v3.4)"

So I'm not really sure what version I'm running.
I would like to

  1. remove any old unused version of python.
  2. end up with one version, which should be the latest

Thanks.

EDIT 1

This is what happens when I try to reinstall python from the commandline:

me@linuxdev:~$ sudo apt-get --reinstall python
E: Command line option --reinstall is not understood

Best Answer

Ubuntu 14.10 comes with Python 2.7.8 (available as python, python2 and python2.7) and Python 3.4.2 (available as python3 and python3.4) installed by default.

As many programs depend on them you can't remove any of them without breaking your system.

Related Question