Install python in ubuntu machine by follow the below steps, Which helps to install all necessary packages needed.
1) To be able to compile Python Source, you will need few packages. Open terminal and execute this command
[code]sudo apt-get install build-essential gcc libncursesw5-dev libreadline-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev[/code]
2) Then execute this command to install python
[code]sudo apt-get install python python-dev[/code]