9

I think the title says it all.

Luis Alvarado
  • 209,003
  • 167
  • 543
  • 707
TheXed
  • 25,946
  • 13
  • 59
  • 89

2 Answers2

9

Python 3 is available from the repositories and can be installed side by side with Python 2:

sudo apt-get install python3 python

You can use the -V switch to find out the minor version numbers:

$ python3 -V
Python 3.1.2

$ python -V
python 2.6.6
Stefano Palazzo
  • 85,787
  • 45
  • 210
  • 227
Mike Axiak
  • 470
  • 1
  • 4
  • 12
0

comment: please note that python 2 and 3 will use different output channels for their prints whilst the returned code will be zero in case of success.

command=python2 --version
rc=0
stderr=Python 2.7.12

.

command=python3 --version
rc=0
stdout=Python 3.5.2