无法建立善变的OSX - Python.h未找到 [英] Unable to build mercurial on OSX - Python.h not found

查看:368
本文介绍了无法建立善变的OSX - Python.h未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关我读过,我需要Python的开发,如何在OSX安装?

For what I've read I need Python-Dev, how do I install it on OSX?

我觉得我有,问题是,我的X code安装不正确,我没有路,我应该。

I think the problem I have, is, my Xcode was not properly installed, and I don't have the paths where I should.

这previous问题:

This previous question:

<一个href=\"http://stackoverflow.com/questions/2685887/where-is-gcc-on-osx-i-have-installed-x$c$c-already\">http://stackoverflow.com/questions/2685887/where-is-gcc-on-osx-i-have-installed-x$c$c-already

约我找不到GCC,现在我找不到Python.h

Was about I couldn't find gcc, now I can't find Python.h

如果我只是链接到我的/ Developer目录到别的地方在/ usr / ???

Should I just link my /Developer directory to somewhere else in /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上的是什么版本你有,我有它在这些景点:

Might depend on what version of Mac OSX you have, I have it in these spots:


/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

此外,我认为,带有X code中的Python版本是一个自定义生成的以x code打得很好,但你必须通过一些箍如果使用其他开发环境跳。

Also I believe the version of python that comes with Xcode is a custom build that plays well with xcode but you have to jump through some hoops if you use another dev environment.

这篇关于无法建立善变的OSX - Python.h未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆