One of the common error that every python developer encounters is the following. This occurs while the installation of Python packages. This can be solved by installing few dependent Linux packages.

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

The command is different for every operating systems.

RHEL or CentOS

sudo yum install python3-devel  

Debian or Ubuntu

sudo apt-get install python3-dev

SUSE Linux

sudo zypper in python3-devel

Fedora Linux

sudo dnf install python3-devel

Alpine Linux

sudo apk add python3-dev


apt-cyg install python3-devel