Python.h header file missing on Mac OS X 10.6

Python is a framework on Mac OS X so you need to,

#include <Python/Python.h>

You also need to call gcc with the -framework argument to actually do anything inside C,

gcc -shared -o sample.so sample.c -framework Python

Leave a Comment