I think the title says it all.
Asked
Active
Viewed 3,452 times
2 Answers
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
- 88,393
Mike Axiak
- 470
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
Alexander Stohr
- 264