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 に答える