在OS X 10.6上安装scrapy的问题

时间:2011-07-12 13:34:33

标签: python macos gcc scrapy

当尝试安装Scrapy 0.12时,我遇到了GCC 4.2编译器的一个重复出现的问题。

从阅读这个上的很多帖子我担心我开始造成更多的伤害而不是好。

关于我缺少什么的任何建议?

我已经:

  • 已安装xcode4(来自appstore,而不是CD)
  • 重新安装了来自macports的依赖项的python
  • 从python 2.6升级到2.7
  • 将/usr/bin/gcc-4.2添加到我的路径

运行简易安装时出现以下错误:

/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

我的路径如下:

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"

1 个答案:

答案 0 :(得分:2)

this answer。因为您已经安装了Xcode 4,所以需要从10.6中Apple提供的Python试图构建的标准体系结构中删除PPC。