【问题标题】:problems installing scrapy on osx 10.10.3 using pip使用 pip 在 osx 10.10.3 上安装 scrapy 的问题
【发布时间】:2015-05-01 19:55:30
【问题描述】:

我无法在 osx 10.10.3 上安装 Scrapy。我运行 pip install Scrapy 并收到以下错误消息,表明无法安装 twisted。我运行了 xcode-select --install 以确保安装了 xcode 工具。我还尝试运行 sudo pip install Scrapy。有什么建议么?

这是我收到的错误消息:

copying twisted/python/sendmsg.c -> build/lib.macosx-10.5-x86_64-2.7/twisted/python
    copying twisted/runner/portmap.c -> build/lib.macosx-10.5-x86_64-2.7/twisted/runner
    copying twisted/test/raiser.c -> build/lib.macosx-10.5-x86_64-2.7/twisted/test
    running build_ext
    gcc -fno-strict-aliasing -I/Applications/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Applications/anaconda/include/python2.7 -c conftest.c -o conftest.o


    Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.


    building 'twisted.test.raiser' extension
    creating build/temp.macosx-10.5-x86_64-2.7
    creating build/temp.macosx-10.5-x86_64-2.7/twisted
    creating build/temp.macosx-10.5-x86_64-2.7/twisted/test
    gcc -fno-strict-aliasing -I/Applications/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Applications/anaconda/include/python2.7 -c twisted/test/raiser.c -o build/temp.macosx-10.5-x86_64-2.7/twisted/test/raiser.o


    Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.


    error: command 'gcc' failed with exit status 69

    ----------------------------------------
    Command "/Applications/anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/_1/4jqhq6xs6psby9hcm82k0w_h0000gn/T/pip-build-iVRJiH/Twisted/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/_1/4jqhq6xs6psby9hcm82k0w_h0000gn/T/pip-SWIIhy-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/_1/4jqhq6xs6psby9hcm82k0w_h0000gn/T/pip-build-iVRJiH/Twisted

【问题讨论】:

    标签: python xcode macos scrapy


    【解决方案1】:

    提示就在错误消息中:

    同意 Xcode/iOS 许可证需要管理员权限,请 通过 sudo 以 root 身份重新运行。

    但是,我建议不要以 root 身份运行实际的安装。只需接受一次 XCode 许可证即可

    sudo xcodebuild -license
    

    然后重新运行安装应该可以解决问题。

    【讨论】:

      猜你喜欢
      • 2023-03-16
      • 1970-01-01
      • 2017-01-19
      • 1970-01-01
      • 1970-01-01
      • 2023-03-30
      • 2021-04-27
      • 2016-02-13
      • 2020-02-19
      相关资源
      最近更新 更多