This post would explain a fix as regards to How To Fix - fatal error: Python.h: No such file or directory.
utilsmodule.c:1:20: fatal error: Python.h: No such file or directory compilation terminated.
sudo apt-get install python-dev # for python2.x
sudo apt-get install python3-dev # for python3.x
sudo dnf install python2-devel # for python2.x
sudo dnf install python3-devel # for python3.x
sudo yum install python-devel # for python2.x
sudo yum install python3-devel # for python3.x
sudo zypper in python-devel # for python2.x
sudo zypper in python3-devel # for python3.x
sudo yum install python-devel # for python2.x
sudo yum install python3-devel # for python3.x
sudo apt-get install python-dev # for python2.x
sudo apt-get install python3-dev # for python3.x
apt-cyg install python-devel # for python2.x
apt-cyg install python3-devel # for python3.x
sudo apt-get install python-dev
\-I/usr/include/python2.7 -lpython2.7
-I/usr/include/python2.7 -lpython3.2
gcc -Wall -I/usr/include/python3.7 -lpython3.7 utilsmodule.c -o Utilc
gcc -Wall -I/usr/include/python2.7 -lpython2.7 utilsmodule.c -o Utilc
Hope this helps to fix the fatal error in Python. Additional Posts: