Quantcast
Channel: Sullerton
Viewing all articles
Browse latest Browse all 12

Mac – the dreaded “command ‘gcc’ failed with exit status 1″ error

$
0
0

I’ve spent hours of my life trying to install PIL on different macs. Each time I fail miserably and relearn the steps to correct the issues. Once again I hit the same compilation error, this time while trying to install PyObj.

macbook$ easy_install pyobjc
....
things are going great
yada yada yada
...
command 'gcc' failed with exit status 1

This is as much a reminder for me as it is for others.

If you are having issues running installs via easy_install or running the command “python setup.py install” and your macintosh keeps barking about gcc, it means the installation process having trouble building one of the dependencies of your package. First make sure you have the latest and greatest version of Xcode. If you are still having an issue, which I always am, then make sure you are letting gcc know what architecture you are trying to build for. You can do this by prefixing your install command like so:

For Intel Macs:
macbook$ sudo env ARCHFLAGS="-arch x86_64" easy_install python-imaging
macbook$ sudo env ARCHFLAGS="-arch x86_64" python setup.py install

For PPC:
macbook$ sudo env ARCHFLAGS="-arch i386" easy_install python-imaging
macbook$ sudo env ARCHFLAGS="-arch i386" python setup.py install


Viewing all articles
Browse latest Browse all 12

Trending Articles