簡體   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