在Python虚拟环境安装scrapy时出现下面bug
MacBook~$ pip3 install scrapy
running build_ext
building 'twisted.test.raiser' extension
creating build/temp.macosx-10.12-x86_64-3.6
creating build/temp.macosx-10.12-x86_64-3.6/src
creating build/temp.macosx-10.12-x86_64-3.6/src/twisted
creating build/temp.macosx-10.12-x86_64-3.6/src/twisted/test
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/twisted/test/raiser.c -o build/temp.macosx-10.12-x86_64-3.6/src/twisted/test/raiser.o
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
error: command 'clang' failed with exit status 69
解决办法:按照错误提示中运行sudo xcodebuild -license,然后按提示敲回车键(enter)打开许可协议,接着提示按“space” 键阅读许可协议,按“q” 不阅读,最终会出现三个选项,agree 、print、cancel,输入agree,然后enter,在把上面安装命令重新下发一遍即可完成安装。
问题原因:有可能之前xcode更新之后没有安装导致。
网友评论