Fatal error: Python.h: No such file or directory under Ubuntu
Install the python-dev
library according to the Python version used .
sudo apt-get install python-dev # for python2.x installs
sudo apt-get install python3-dev # for python3.x installs
For example, in the case of using Python 3.6, pass:
sudo apt-get install python3.6-dev
Install python-dev
.
Similar Posts:
- Linux Error: _mysql.c:32:20: fatal error: Python.h: No such file or directory [Solved]
- Ubuntu Error: No module named ‘apt_pkg’ (Step-by-Step Tutorial)
- [How to Solve] ImportError: No module named MySQLdb
- How to Solve Error: /usr/bin/env: ‘python’: No such file or directory
- Ubuntu16.04 Install python-ldap error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
- [Solved] pip and setuptools upgrade Error: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-fH0Feg/pip/
- [Solved] Python3 Error: ModuleNotFoundError: No module named ‘_bz2’
- Error in python2.7 installation of pycrypto Library [How to Solve]
- [Solved] yum Execute Error: -bash: /usr/bin/yum: /usr/bin/python3.7: bad interpreter: No such file or directory
- Python compiles and installs under Linux and reports an error: makefile: 1141: install