How do I install M2Crypto on Ubuntu?
You probably need to install the python development packages:
sudo apt-get install python-dev
Better yet, don't bother building m2crypto yourself. It's already in the Ubuntu repositories as a fully supported package. This way, you'll get automatic updates through the same means as the rest of your Ubuntu system:
sudo apt-get install python-m2crypto