2

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

TheMaster
  • 45,448
  • 6
  • 62
  • 85
jldupont
  • 93,734
  • 56
  • 203
  • 318

2 Answers2

4

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

Nicholas Riley
  • 43,532
  • 6
  • 101
  • 124
0

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'

GregD
  • 741
  • 7
  • 15