2

(这里是新手)我一直在尝试使用easy_install安装scrapy,但出现以下错误:

    Ben$ easy_install -U Scrapy
    Searching for Scrapy
    Reading http://pypi.python.org/simple/Scrapy/
    Reading http://scrapy.org
    Best match: Scrapy 0.14.4
    Processing Scrapy-0.14.4-py2.7.egg
    Scrapy 0.14.4 is already the active version in easy-install.pth
    Installing scrapy script to /Library/Frameworks/Python.framework/Versions/2.7/bin

    Using /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Scrapy-0.14.4-py2.7.egg
    Processing dependencies for Scrapy
    Searching for lxml
    Reading http://pypi.python.org/simple/lxml/
    Reading http://codespeak.net/lxml
    Best match: lxml 2.3.6
    Downloading http://lxml.de/files/lxml-2.3.6.tgz
    Processing lxml-2.3.6.tgz
    Running lxml-2.3.6/setup.py -q bdist_egg --dist-dir /var/folders/j1/l3w7_q554b3fkk3xyw_998nc0000gn/T/easy_install-w5NqEl/lxml-2.3.6/egg-dist-tmp-6MyEeO
    Building lxml version 2.3.6.
    Building without Cython.
    Using build configuration of libxslt 1.1.26
    unable to execute gcc-4.0: No such file or directory
    error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1

知道我在这里缺少什么吗?

谢谢

4

1 回答 1

1

先安装GCC;最简单的方法是通过https://github.com/kennethreitz/osx-gcc-installer。安装 GCC 后,再次运行 easy_install。

于 2012-10-04T15:04:34.940 回答