If you are arriving on this page looking for the solution of following error message during python2.6 installation (make) on your Ubuntu:
Failed to find the necessary bits to build these modules:
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
then here is the solution:
$ wget http://www.lysium.de/sw/python2.6-disable-old-modules.patch
$ patch -p1 < python2.6-disable-old-modules.patch
For a complete guide to install python 2.6 on your Ubuntu, you can check this page, its really useful.