Installing Python on Ubuntu Operating System

Published on
12,406 Points
Last Modified:
This article will show the steps for installing Python on Ubuntu Operating System.

I have created a virtual machine with Ubuntu Operating system 8.10 and this installing process also works with upgraded version of Ubuntu OS.

For installing Python we need to download Python on our operating system and then install it.
Creating and installing Ubuntu on Oracle VirtualBox can be seen from my blog i.e. : http://slobaexpert.wordpress.com/2012/06/10/installing-ubuntu-on-oracle-vm/

Below are the details steps for installation assuming that we have installed Ubuntu OS :

Step 1) Open Ubuntu from Oracle VirtualBox (Note: we can also use VMware instead of Oracle VirtualBox):

image 1
Step 2) Navigate to 'Application' then click on  'Accessories' and finally open a new 'Terminal':
image 2
image 3
Step 3) Type 'sudo su' and keep it aside, so in the mean while we can download Python:

image 4
Step 4) Open Mozilla Firefox and go to Python official web site i.e. http://python.org/:

image 5
image 6
Step 5) Navigate to Download tab and download Python :
image 7
Download the latest version:
image 8
Once clicked on the link we will be asked to either open it or save it as like below:
image 9
Click 'OK' :
image 10
image 11
image 12
image 13
Step 6) Go to your desktop and extract the file there(you can also choose your own folder or path where you want to extract but here I am extracting it on the desktop ):
image 14
image 15
image 16
image 17
Step 7)  Now go to the terminal opened earlier and go to the desktop path where Python file is been extracted:

image 18
image 19
image 20
Step 8) Then type './configure' and hit enter:
image 21
image 22
image 23
Step 9) Type 'make' and hit enter:
image 24
image 25
Step 10) Now finally type 'sudo make altinstall' and hit enter:
image 26
image 27
image 28
Step 11) Let us verify if the installation is done successfully or not, for doing this open another 'Terminal' and type 'python' and hit enter:
image 29
image 30
image 31
Finally we can see that we have installed Python on Ubuntu operating system. Let us write a simple program to print 'Hello Sloba' :

image 32
To exit from Python we can type 'exit()' as like below:
image 33
image 34
Now starting programming in Python on Ubuntu operating system.
Author:Swadhin Ray

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Join & Write a Comment

Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Next Article:

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month