2011-07-12 41 views
1

当试图安装Scrapy 0.12时,我遇到了GCC 4.2编译器的一个重复问题。在OS X上安装scrapy的问题10.6

从阅读很多帖子,我担心我已经开始做更多的伤害,而不是好的。

关于我失踪的任何建议?

我有:

  • 安装xcode4(从AppStore的,而不是CD)
  • 重新安装蟒蛇从MacPorts的依赖
  • 从蟒蛇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

如果你无法弄清楚,你可能会重新评估你是否需要scrapy。使用[urllib](http://docs.python.org/library/urllib.html)和[lxml](http://lxml.de/)可以在5行内完成这一功能,这两者都是我相信scrapy使用它。 –

回答

2

this answer。由于您安装了Xcode 4,因此您需要从标准体系结构中删除PPC,该标准体系结构是Apple在10.6版中试图构建的标准体系结构。