Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python includes files on Lion?

Where have been includes files of python in lion ? Usually it was located at "/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6" but there is only one files in there : "pyconfig.h"

Is it the same on your system ?

Thanks.

like image 792
Ziggy Avatar asked Jan 22 '26 09:01

Ziggy


1 Answers

On OS X 10.7, the include files for the Apple-supplied Pythons are linked into the locations within /System/Library/Frameworks when you install Xcode 4. You will find also find them in the /Developer/SDKs included with Xcode, for example:

/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7

By the way, the canonical way to find the location of Python's include files is to use the python-config command associated with the Python instance you are using:

$ /usr/bin/python2.7-config --include
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7

UPDATE: I initially answered that the include files were only found in the SDK location. But I then remembered that, due to a nasty bug, I had had to reinstall 10.7 Lion on the same partition and by doing so that wiped out the links that the initial Xcode 4 install had made. After also re-installing Xcode 4 everything was as it should be. Something to keep in mind if you have to reinstall Lion.

like image 200
Ned Deily Avatar answered Jan 24 '26 22:01

Ned Deily