Ubuntu comes with both python versions 2.x and 3.x.
The default python version in ubuntu is 2.x
The python versions installed in ubuntu can be found using the below commands:
For both cases, to get out from Python shell, write:
exit()
For installing python modules in python 2.x in ubuntu, use :
pip
For installing python modules in python 3.x in ubuntu, use:
pip3