1

When trying to install Scrapy 0.12 I'm running in to a reoccurring issue with the GCC 4.2 compiler.

From reading MANY posts on this i'm worried I've started to do more damage than good.

any suggestions on what I'm missing?

I've:

  • Installed xcode4 (from the appstore, not CD)
  • reinstalled python with dependencies from macports
  • upgraded from python 2.6 to 2.7
  • added /usr/bin/gcc-4.2 to my PATH

when running easy install I get the following error:

/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
src/lxml/lxml.etree.c:161594: fatal error: error writing to -: Broken pipe
compilation terminated.
lipo: can't open input file: /var/folders/bA/bAc9wNqJGCSI4UGlXRPBSk+++TI/-Tmp-//cc6gLxNp.out (No such file or directory)
error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1

My Path is as follows:

PATH="/usr/bin/gcc-4.2:/usr/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Users/zeppo/Downloads/gcc-4.2-5566-darwin8-all.tar/usr:/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php5.3/bin:/Users/zeppo/Sites/dev/cake/console:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin"
Ned Deily
  • 83,389
  • 16
  • 128
  • 151
papacostas
  • 848
  • 1
  • 9
  • 24
  • 1
    If you can't figure that out, you might re-evaluate if you need scrapy. It's amazing what you can do in ~5 lines with [urllib](http://docs.python.org/library/urllib.html) and [lxml](http://lxml.de/), both of which are used by scrapy I believe. – Pat B Jul 12 '11 at 16:18

1 Answers1

2

See this answer. Because you have installed Xcode 4, you need to remove PPC from the standard architectures that the Apple-supplied Python in 10.6 attempts to build for.

Community
  • 1
  • 1
Ned Deily
  • 83,389
  • 16
  • 128
  • 151