fatal error: Python.h: No such file or directory
Process: through PIP install a library, an error occurred and the python. H header file could not be found
Solution
Search stackoverflow. My environment is CentOS, so execute sudo Yum install python3 devel
and then go to the PIP install library. It’s all OK
For apt (Ubuntu, Debian…):
sudo apt-get install python-dev # for python2.x installs
sudo apt-get install python3-dev # for python3.x installs
For yum (CentOS, RHEL…):
sudo yum install python-devel # for python2.x installs
sudo yum install python3-devel # for python3.x installs
For dnf (Fedora…):
sudo dnf install python2-devel # for python2.x installs
sudo dnf install python3-devel # for python3.x installs
For zippers (openSUSE):
sudo zypper in python-devel # for python2.x installs
sudo zypper in python3-devel # for python3.x installs
For apk (Alpine…):
This is a departure from the normal Alpine naming
scheme, which uses py2- and py3- prefixes
sudo apk add python2-dev # for python2.x installs
sudo apk add python3-dev # for python3.x installs
For apt-cyg (Cygwin…):
apt-cyg install python-devel # for python2.x installs
apt-cyg install python3-devel # for python3.x installs
Read More:
- Fatal error in CentOS: Python. H: no that file or directory
- fatal error: Python.h: No such file or directory
- fatal error: Python.h: No such file or directory compilation terminated.
- gcc /usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
- [C]fatal error: mysql.h: No such file or directory
- [Solved] Docker ubuntu swoole fatal error: openssl/ssl.h: No such file or directory
- #During OpenGL development, fatal error C1083: can’t open include file: “GL / glut. H”: no such file or directory
- fatal error: openssl/bio.h: No such file or directory settlement programme
- [Caffe] fatal error: hdf5.h: No such file or directory error solution
- Compiling the pi_kernel source code appears: fatal error: openssl/opensslv.h: No such file or directory
- Linux QT download / usr / include / C + + / 7/ cstdlib:75 : 15: fatal error: stdlib. H: no such file or directory error
- Error: libipq. H: no such file or directory solution
- caffe deep learning [three] compilation error: fatal error: hdf5.h: No such file or directory compilation terminated.
- RCurl error-fatal error: curl/curl.h: No such file or directory
- Cannot open include file: ‘io.h‘: No such file or directory
- A fatal error C1083 occurred when compiling C + + code under. Net: unable to open the include file: “xuhk”_ Jnihelloworld. H “: solution to no such file or directory error.
- 【linux】error: stdio.h: No such file or directory
- In VS2010, the compiler cannot open the file “GL / glaux. H”: no such file or directory
- VS2010 compiler can’t open include file: “GL / glaux. H”: no such file or directory
- Solution of header file StdAfx. H “no such file or directory” in Visual Studio