I wrote a simple program in python: Then I execute this: It was generated a file: main.c And then I tried this: And I have an error: How to compile python to c ? How to get started with cython with xcode on mac ? Answer You have to tell the gcc compiler where is the pyconfig.h file on your