Thank you all.<div><br class="webkit-block-placeholder"></div><div>Finally the problem was solved by installing Xcode from the DVD which comes with the computer. But installing the same program downloaded from apple site always cause the gcc error. <br>
<div><br class="webkit-block-placeholder"></div><div>Jie<br><br><div class="gmail_quote">2008/6/5 Mathieu Prevot <<a href="mailto:mathieu.prevot@ens.fr">mathieu.prevot@ens.fr</a>>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2008/6/6 Mathieu Prevot <<a href="mailto:mathieu.prevot@ens.fr">mathieu.prevot@ens.fr</a>>:<br>
<div><div></div><div class="Wj3C7c">> 2008/6/5 Zhaojie Boulder <<a href="mailto:gongchangzhaojie@gmail.com">gongchangzhaojie@gmail.com</a>>:<br>
>> Hello,<br>
>> I am new to Mac and used python in linux before. What I am trying to do is<br>
>> to install "Ipython" and "PyCogent" in Mac OS X.<br>
>> For PyCogent, after entering the package path, I typed "python setup.py<br>
>> install". The results are as follows:<br>
>> Didn't find Pyrex - will compile from .c files<br>
>> running install<br>
>> running build<br>
>> running build_py<br>
>> running build_ext<br>
>> building 'cogent.align._compare' extension<br>
>> gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd<br>
>> -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX<br>
>> -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe<br>
>> -I/Users/zhaojie/Downloads/PyCogent-1.0.1/include<br>
>> -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5<br>
>> -c cogent/align/_compare.c -o<br>
>> build/temp.macosx-10.5-i386-2.5/cogent/align/_compare.o -w<br>
>> unable to execute gcc: No such file or directory<br>
>> error: command 'gcc' failed with exit status 1<br>
>> After google, I installed Xcode,but it did not help. Also, the Xcode folder<br>
>> is not within "applications" folder, but a separate one parallel with<br>
>> "applications". Dragging Xcode folder into the applications folder did not<br>
>> make a difference, either.<br>
>> Hope someone familiar with Mac can help me out.<br>
><br>
> Normally gcc is installed in /usr/bin. If you type "which gcc", it<br>
> should return "/usr/bin/gcc". Xcode is an IDE that use gcc or another<br>
> compiler eg. icc the Intel compiler, hence if you move Xcode in the<br>
> application folfer it won't change anything. You install Xcode by<br>
> double clicking on a .pkg file from your Leopard DVD.<br>
><br>
> You also can download gcc from the site and bootstrap/compile it.<br>
<br>
</div></div>Note that you don't need to install Xcode in the "right place", it is<br>
normally installed in /Developer, and installs gcc and other files in<br>
/usr/bin /usr/share etc.<br>
<br>
In general, try "locate prog" to try to find where is prog, and check<br>
if the binary prog's path is in your PATH. eg. you can compile and<br>
install a gnu tool by ./configure --prefix=$HOME && make && make<br>
install, and the binaries will be installed in ~/bin/. If you don't<br>
have ~/bin/ in your PATH, it won't execute. Adding 'export<br>
PATH="$PATH:$HOME/bin:"' in your .bashrc will solve the problem (or<br>
'setenv PATH "$PATH:$HOME/bin:' in your .tcshrc)<br>
<br>
Using --prefix=$HOME allow you to run and install your binaries and<br>
libraries. You can do this for a group of users without root access,<br>
so you can share, or preserve your OS bin/lib/include/share easily, or<br>
allow alternative use of several versions of libraries/binaries etc.<br>
<br>
Other possibilities are the chroot and the sophisticated FreeBSD<br>
jails. Google for them to know more.<br>
<br>
Hope that helps,<br>
<font color="#888888">Mathieu<br>
</font></blockquote></div><br></div></div>