I'm running a new mac with osx lion and it came with the latest Python 2.7. My /Library/Frameworks/Python.framework/Versions directory has 2.3, 2.5, 2.6, 2.7, and Current.
Now 2.5 and 2.6 have Python.h and many other header files in /include.
My problem is I can't find any header files except pyconfig.h in the 2.7/include or Current/include directories.
Can anyone shed light on this?
EDIT:
as Foo Bah pointed out, I should be looking for my header files in /usr/include. So in /usr/include I do not even have a folder python2.7. I have folders for previous version, python2.5 and python2.6.
Is there a reason that python2.7 include folder is not there even though the mac came with 2.7?
OK found the answer.
You need to install a newer version of Xcode.
I had installed an older Xcode 3.2 on Lion. After upgrading, my /usr/include/python2.7 directory was populated with the header files.
Your headers should be in /usr/include.
For example:
$ ls /usr/include/python2.*/Python.h
/usr/include/python2.5/Python.h
/usr/include/python2.7/Python.h
/usr/include/python2.6/Python.h
None of the python distributions that come with OSX use /usr/local. If you have a separate /usr/local, you probably installed python externally
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With