How to install the Python development headers on Mac OS X? How to install the Python development headers on Mac OS X? python python

How to install the Python development headers on Mac OS X?


The latest Python 3 formula links a program called python3-config. You can use it to find the headers like this:

python3-config --include

On my machine, this outputs:

-I/usr/local/Cellar/python3/3.3.4/Frameworks/Python.framework/Versions/3.3/include/python3.3m -I/usr/local/Cellar/python3/3.3.4/Frameworks/Python.framework/Versions/3.3/include/python3.3m

You may need to brew update && brew rm python3 && brew install python3 to enable this.

There is an equivalent program called python-config for Python 2.


Are these the headers you are looking for:

Cellar/python3/3.3.0//Frameworks/Python.framework/Versions/3.3/include/python3.3m/