我正在使用Xcode。我在这个新的mac上遇到错误:
'Python.h' file not found.
在线:
#include <Python.h>
当我在命令行中输入sudo find / -name "Python.h"
时,我可以看到它的很多版本,甚至在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
任何人都知道发生了什么事吗?是不是我没有正确设置Xcode? p>
答案 0 :(得分:2)
您需要设置包含路径,其中&#39; Python.h&#39;存在。
有关详细操作,请参阅问题&#34;如何在xcode项目中设置包含路径&#34;在以下网址。