Python Version Setup (Ubuntu 14.04)
Bhaskar S | 03/29/2015 |
In Ubuntu (14.04 and earlier), the default version of Python installed is the version 2.x. The future of Python is version 3.x.
To have both versions 2.x and 3.x of Python as alternatives in Ubuntu 14.04, execute the following steps:
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 2
Now execute the following command:
sudo update-alternatives --config python
The following will be the typical output:
There are 2 choices for the alternative python (providing /usr/bin/python). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/bin/python2 2 auto mode 1 /usr/bin/python2 2 manual mode 2 /usr/bin/python3 1 manual mode Press enter to keep the current choice[*], or type selection number:
Currently, we have chosen the version 2.x of Python