简体   繁体   中英

problems installing scrapy on osx 10.10.3 using pip

I am unable to install Scrapy on osx 10.10.3. I ran pip install Scrapy and received the error message below indicating that twisted cannot be installed. I ran xcode-select --install to ensure that xcode tools are installed. I also tried running sudo pip install Scrapy. Any suggestions?

here is the error message I receive:

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

The hint is right there in the error message:

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

However, I would recommend against running the actual installation as root. Just accepting the XCode license once by doing

sudo xcodebuild -license

and then re-running the installation should do the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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