问题描述
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
在这个方面我是一个非常大的菜鸟(我已经学会了使用python和unix,但是我从来不需要处理安装.)早些时候,我遇到了与gcc-4.2相关的错误,而不是被发现,我发现了一些建议重新安装XCode的帖子.我使用4.0(错误的选择?),现在我明白了.我现在不知道该怎么办.
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.
推荐答案
在升级到XCode 4之后,这发生在我身上;我没有时间弄清楚升级过程中出了什么问题(或者这是否是预期的行为),但是以下变通办法对我有效:
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
ARCHFLAGS
技巧也可以与setup.py
一起使用:
The ARCHFLAGS
trick works with setup.py
as well:
env ARCHFLAGS="-arch i386 -arch x86_64" python setup.py install
这篇关于python easy_install失败,并显示“未安装体系结构ppc的汇编器";在Mac OS X上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!