This is because the source repositories are disabled in your /etc/apt/sources.list. Find the line:
deb http://archive.ubuntu.com/ubuntu <version-name> main restricted multiverse
Duplicate it and change 'deb' to 'deb-src', for example:
deb-src http:
Now run:
sudo apt-get update
Then you can install the dependencies for Python by doing:
sudo apt-get build-dep python
source
share