python easy_install 失败,“未安装架构 ppc 汇编程序";在 Mac OS X 上 [英] python easy_install fails with "assembler for architecture ppc not installed" on Mac OS X

查看:15
本文介绍了python easy_install 失败,“未安装架构 ppc 汇编程序";在 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  

我是这方面的一个大菜鸟(我已经学会了使用 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:

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

这篇关于python easy_install 失败,“未安装架构 ppc 汇编程序";在 Mac OS X 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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