[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


Installing Python on Ubuntu Operating System

Published on
12,578 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

Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

Suggested Articles

Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month