Fix fatal error: Python.h: No such file or directory

Do you have this error in your when trying to pip install certain packages? (In my case pycrypto)

fatal error: Python.h: No such file or directory

Fix it by installing Python development libraries.

Ubuntu

sudo apt-get install python2.7-dev

Will probably also work for other versions of python (i.e. python2.X-dev)

Via Alex Sleat