views:

261

answers:

2

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

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

This previous question:

http://stackoverflow.com/questions/2685887/where-is-gcc-on-osx-i-have-installed-xcode-already

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

Should I just link my /Developer directory to somewhere else in /usr/ ???

This is my output:

$ 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
...

Thanks in advance.

+1  A: 

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

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.

dhdean
Thanks, I've checked and yes, is there also. Now the question would be, how to make gcc find it. Is there a way to globally modify the *include path* ?
OscarRyz
@OscarRyz: Pass the `-I` flag to gcc: `gcc -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5`
mipadi
A: 

Are you sure you want to build Mercurial from source? There are binary packages available, including the nice MacHg which comes with a bundled Mercurial.

Martin Geisler