Raspi g++ no python.h code example
Example 1: Python.h: No such file or directory
For apt (Ubuntu, Debian...):
sudo apt-get install python-dev
sudo apt-get install python3-dev
For yum (CentOS, RHEL...):
sudo yum install python-devel
sudo yum install python3-devel
For dnf (Fedora...):
sudo dnf install python2-devel
sudo dnf install python3-devel
For zypper (openSUSE...):
sudo zypper in python-devel
sudo zypper in python3-devel
For apk (Alpine...):
sudo apk add python2-dev
sudo apk add python3-dev
For apt-cyg (Cygwin...):
apt-cyg install python-devel
apt-cyg install python3-devel
Example 2: Python.h: No such file or directory
sudo apt-get install python-dev
sudo apt-get install python3-dev