Python (Scripting) - Resolve "Python.h: No such file or directory"

by
Jeremy Canfield |
Updated: June 13 2023
| Python (Scripting) articles
Let's say something like this is being returned when attempting to install a Python package.
Python.h: No such file or directory
This typically means the python-devel and/or python<version>-devel packages are not installed. On a Debian distribution (Ubuntu, Mint), the apt-get install command can be used to install the Python devel packages. On a Red Hat distribution (CentOS, Fedora, Red Hat), the dnf install or yum install commands can be used.
dnf install python-devel
dnf install python36-devel
Did you find this article helpful?
If so, consider buying me a coffee over at