Ubuntu – Installing python 3.x on Ubuntu 15.10

aptpythonpython3

I have already python 2.7 on my machine. I can't recall if I installed it or it is a built-in install. Anyhow, I would like to install work with python 3.x and I wonder if I need first to uninstall the 2.7 version. Are there any component in the system which rely on this version?

Thanks.

Best Answer

  • Don't remove python 2!!

    Ubuntu versions, later then 12.04 already have python 3 installed. This is an additional version, not instead of.

    A lot of software (still) depends however on 2.7, removing it will break the system. On Ubuntu, python 2 is called by:

    python
    

    or

    python2
    

    while python 3 is called by

    python3
    

    See the current version(s)

    If you run:

    python3 -V
    

    you will get your current version of python 3, while

    python -V
    

    will output the current version of python 2

  • Related Question