繁体   English   中英

使用pip在osx 10.10.3上安装scrapy的问题

[英]problems installing scrapy on osx 10.10.3 using pip

我无法在osx 10.10.3上安装Scrapy。 我运行了pip install Scrapy,并收到以下错误消息,指示无法安装twis​​ted。 我运行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

提示就在错误消息中:

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

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

sudo xcodebuild -license

然后重新运行安装即可解决问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM