【发布时间】:2014-10-20 11:49:34
【问题描述】:
我正在使用 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 吗?
【问题讨论】:
标签: python c++ xcode macos python-2.7