Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
912 views
in Technique[技术] by (71.8m points)

xcode - python easy_install fails with "assembler for architecture ppc not installed" on Mac OS X

bash-3.2$ sudo easy_install appscript  
Password:  
Searching for appscript  
Reading http://pypi.python.org/simple/appscript/  
Reading http://appscript.sourceforge.net  
Best match: appscript 1.0.0  
Downloading http://pypi.python.org/packages/source/a/appscript/appscript-1.0.0.tar.gz#md5=6619b637037ea0f391f45870c13ae38a  
Processing appscript-1.0.0.tar.gz  
Running appscript-1.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-C4d1az/appscript-1.0.0/egg-dist-tmp-yVTHww  
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed  
Installed assemblers are:  
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64  
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386  

I'm a pretty big noob at this stuff (I've learned to use python and unix a bit, but I've never had to deal with installation.) Earlier I was getting an error related to gcc-4.2 not being found, and I found some posts that recommended reinstalling XCode. I went with 4.0 (bad choice?) and now I get this. I've got no idea what to do at this point.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This happened for me after having upgraded to XCode 4; I haven't had time to figure out what went wrong during the upgrade (or whether this is the intended behaviour), but the following workaround works for me:

sudo env ARCHFLAGS="-arch i386" easy_install whatever

The ARCHFLAGS trick works with setup.py as well:

env ARCHFLAGS="-arch i386 -arch x86_64" python setup.py install

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...