Help Installing Python on Ubuntu

Solution 1:

To install python 2:

sudo apt install python

To install python 3:

sudo apt install python3

To see python version just start python

python

for python2

python3

for python3

You can also use:

python --version

or

python3 --version

To install the latest version, download it, unzip it and install primary versions of python (the one you want by default) with:

sudo make install

and install secondary versions with:

sudo make altinstall

You can also follow this answer: How do I install Python 3.6 using apt-get?