I just wrote a simple C executable to check if Python.h
is working or not
#include<Python.h>
#include<stdio.h>
int main()
{
printf("this is a python header file included programm\n");
return 0;
}
Obviously, it does not do much. However, when I try to compile it with gcc
it gives me an error:
foo.c:1:19: fatal error: Python.h: No such file or directory.
Then I checked to see if the python-dev package has Python.h
installed or not using locate
.
$locate Python.h
/usr/include/python2.7/Python.h
It is clear to me that I have the Python.h
header file on my system. How do I get my executable working?