Steven
Steven

Reputation: 430

Cannot find file <Python.h>

I'm using Xcode. I got an error on this new mac: 'Python.h' file not found. At line: #include <Python.h>

When I type sudo find / -name "Python.h" in command line, I can see quite a few version of it exist, even inside Xcode.

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h find: /dev/fd/3: Not a directory find: /dev/fd/4: Not a directory /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h /System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h

Anyone have any idea of what is going on? Is that I am not setting up Xcode properly?

Upvotes: 1

Views: 3306

Answers (1)

Fumu 7
Fumu 7

Reputation: 1091

You need to set the include path where 'Python.h' exists.

For detailed operation, please refer the question "How to set include path in xcode project" at following URL.

How to set include path in xcode project

Upvotes: 2

Related Questions