appscript on OSX 10.6.3 / Python 2.6.1

柔情痞子 提交于 2019-12-12 18:23:31

问题


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...


回答1:


Rerun the Xcode installer and check "UNIX Development" - it will put compilers in /usr/bin in addition to /Developer.




回答2:


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'



来源:https://stackoverflow.com/questions/2769910/appscript-on-osx-10-6-3-python-2-6-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!