shap/_cext.cc:3:10: fatal error: Python.h: No such file or directory 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 missing
sudo apt-get install python-dev python3-dev