configure: error: header file Python.h is required for Python

El siguiente error se puede presentar en tiempo de compilación cuando hay dependencias con Python:

checking for int8... no
checking for uint8... no
checking for int64... no
checking for uint64... no
checking for sig_atomic_t... yes
checking for POSIX signal interface... yes
checking for working memcmp... yes
checking Python.h usability... no
checking Python.h presence... no
checking for Python.h... no
configure: error: header file  is required for Python

La solución es muy sencilla. Estamos compilando algo, en este caso, PostgreSQL con soporte Python --with-python y no tenemos instaladas las fuentes de compilación (devel) de python. Para instalar Python Devel en RHEL, CentOS o similares, simplemente ejecutad la siguiente instrucción de yum:

# yum install python-devel

En el caso de que trabajéis con Debian, Ubuntu o sistemas que usan APT como gestor de paquetes:

# apt-get install python-dev

Si utilizáis una versión de python distinta a la que tenga por defecto el sistema, instalad las fuentes específicas de esa versión, ejemplos:

# yum install install python3-devel
# apt-get install python3-dev