Reputation: 332
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.
Upvotes: 3
Views: 3342
Reputation: 85095
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.
Upvotes: 3
Reputation: 391972
Do this
import sys
sys.path
It will show you where the library files are. Something like this
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages
From the site-packages, go up three directory levels and down into include
(../../../include/python2.6
). You'll find things here:
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
Note. No /System
Upvotes: 1