chenwydj
2/24/2020 - 6:40 PM

Python.h

fatal error: Python.h: No such file or directory

gcc - fatal error: Python.h: No such file or directory - Stack Overflow c - I have Python on my Ubuntu system, but gcc can't find Python.h - Stack Overflow

Ubuntu

sudo apt-get install python3-dev
locate Python.h
# see if you have Python.h under /usr/include/python3.6/

Centos

sudo yum install python36u-devel

if you already have Python.h

change

#include "Python.h"

into

#include to "python3.6/Python.h"