OSX 10.6.3 / Python 2.6.1 上的 appscript
我在 OS/X 10.6.3 / Python 2.6.1 上安装 appscript
时遇到一些问题。当我发出
sudo easy_install appscript
时,我得到“无法执行 gcc-4.2:没有这样的文件或目录”。即使当我导出 CC=/Developer/usr/bin/gcc-4.2(有效的 gcc-4.2 可执行文件)时,easy_install 也会发出警告。
可能是什么问题?
免责声明: OS/X 新手掌舵...
I am having some trouble getting appscript
installed on OS/X 10.6.3 / Python 2.6.1. When I issue
sudo easy_install appscript
I get "unable to execute gcc-4.2: No such file or directory". Even when I do export CC=/Developer/usr/bin/gcc-4.2
(a valid gcc-4.2 executable), easy_install
barks.
What could be the issue?
Disclaimer: OS/X newbie at the helm...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
重新运行 Xcode 安装程序并选中“UNIX Development”——除了 /Developer 之外,它还会将编译器放入 /usr/bin 中。
Rerun the Xcode installer and check "UNIX Development" - it will put compilers in /usr/bin in addition to /Developer.
我认为所提出的解决方案在很多情况下都不够,因为(例如)我已经在 /usr/bin 中拥有了这些工具并得到了相同的错误。
问题是 gcc 是用 -arch ppc 标志调用的,通常不再支持该标志。
你需要(一)
在 shell 环境中设置 ARCHFLAGS 这样就可以了
类似于“-arch i386 -arch x86_64”
或对于(b)永久修复:
编辑
/System/Library/Frameworks/Python.framework/Versions/Current/lib/python*/distutils/sysconfig.py
更改
archflags = '-arch i386 -arch ppc -arch x86_64'
或者是
archflags = '-arch i386 -arch x86_64'
I don't think the solution proposed is sufficient in many cases, as (for example) I already have the tools in /usr/bin and get the same error.
The problem is that gcc is being invoked with an -arch ppc flag, which generally is not supported any longer.
You need to (a)
set ARCHFLAGS in the shell environment so that is it
something like '-arch i386 -arch x86_64'
or for (b) for a permanent fix:
edit
/System/Library/Frameworks/Python.framework/Versions/Current/lib/python*/distutils/sysconfig.py
to change
archflags = '-arch i386 -arch ppc -arch x86_64'
or be
archflags = '-arch i386 -arch x86_64'