xcode – 无法在OSX上构建mercurial – 找不到Python.h

对于我所读到的,我需要 Python-Dev,如何在OSX上安装它?

我认为我遇到的问题是,我的Xcode没有正确安装,我没有我应该的路径.

上一个问题:

Where is gcc on OSX? I have installed Xcode already

是关于我找不到gcc,现在我找不到Python.h

我应该将我的/ Developer目录链接到/usr/???中的其他位置吗?

这是我的输出:

$sudo easy_install mercurial
Password:
Searching for mercurial
Reading http://pypi.python.org/simple/mercurial/
Reading http://www.selenic.com/mercurial
Best match: mercurial 1.5.1
Downloading http://mercurial.selenic.com/release/mercurial-1.5.1.tar.gz
Processing mercurial-1.5.1.tar.gz
Running mercurial-1.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_7RaTq/mercurial-1.5.1/egg-dist-tmp-l7JP3u
mercurial/base85.c:12:20: error: Python.h: No such file or directory
...

提前致谢.

解决方法

可能取决于您拥有的Mac OSX版本,我在以下位置拥有它:

/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h
/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h

另外我相信Xcode附带的python版本是一个可以很好地与xcode配合使用的自定义版本,但是如果你使用另一个开发环境,你必须跳过一些箍.

相关文章

在有效期内的苹果开发者账号(类型为个人或者公司账号)。还...
Appuploader官网--IOS ipa上传发布工具,证书制作工具跨平台...
苹果在9月13号凌晨(北京时间)发布 iOS 16,该系统的设备可...
计算机图形学--OpenGL递归实现光线追踪
Xcode 14打出来的包在低版本系统运行时会崩溃,报错信息是Li...