which version of python is installed?

I installed Ubuntu 12.10 in my VirtualBox. Is python installed by default? If not, How can I install python?

1

5 Answers

Running python --version in a terminal will show you which version of python is currently installed. Python does come by default on ubuntu 12.10 (version 2.7.3) source

edit: it has come to my attention that not only is python (2.7.3) available, but also python3 (3.2.3)

To test this type python in a terminal to access python 2.7 and python3 to access python 3. In 12.10 both python 2.7 and python 3 are installed by default.

Yes, it is installed by default. All Linux distros that I am aware of install python as a lot of default scripts are python.

If you want to see if a piece of software is installed and if there are multiple versions of it, what versions you have installed on your system, this is a good way to find them:

aptitude search ^python[0-9] | grep ^i

If you ever find yourself wanting to install python:

aptitude install python

Hope that helps.

Enter this command in a terminal emulator window
python -V
which will provide you complete version detail.

It seems that intent to assign the "python" command to python3 eventually ceased; "python" still means python2 on many systems. So, issue two commands, python2 --version and python3 --version (and also python --version to be sure).

This won't reveal any private or isolated installations.

How can I install python?

First, decide which version and features you want (plain python, scientific/math, ipython...)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like