博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
python安装scrapy爬虫框架,提示 error: command 'clang' failed with exit status 1
阅读量:4123 次
发布时间:2019-05-25

本文共 1139 字,大约阅读时间需要 3 分钟。

 

scrapy是python爬虫中,比较常用的一种框架。

提示异常:

Mac上安装的时候,报错"error: command 'clang' failed with exit status 1"。

songrenqingdeMacBook-Pro:~ songrenqing$ pip install scrapyCollecting scrapy  Using cached https://files.pythonhosted.org/packages/db/9c/cb15b2dc6003a805afd21b9b396e0e965800765b51da72fe17cf340b9be2/Scrapy-1.5.0-py2.py3-none-any.whl...    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun    error: command 'clang' failed with exit status 1

异常原因:

Mac的OSX系统的C语言,编译器用的是Clang。既然报错与clang有关,应该是xcode command tools出现问题,网上搜了一下其它文章,大部分人也都是通过更新安装xcode解决的。

songrenqingdeMacBook-Pro:~ songrenqing$ gcc --versionConfigured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1Apple LLVM version 9.1.0 (clang-902.0.39.2)

解决办法:

执行 xcode-select --install 命令后,重新安装 

songrenqingdeMacBook-Pro:~ songrenqing$ xcode-select --installxcode-select: note: install requested for command line developer toolssongrenqingdeMacBook-Pro:~ songrenqing$ pip install scrapy......Successfully installed Twisted-18.4.0 scrapy-1.5.0

转载地址:http://xqapi.baihongyu.com/

你可能感兴趣的文章
pytorch(5)
查看>>
ubuntu相关
查看>>
C++ 调用json
查看>>
nano中设置脚本开机自启动
查看>>
动态库调动态库
查看>>
Kubernetes集群搭建之CNI-Flanneld部署篇
查看>>
k8s web终端连接工具
查看>>
手绘VS码绘(一):静态图绘制(码绘使用P5.js)
查看>>
手绘VS码绘(二):动态图绘制(码绘使用Processing)
查看>>
基于P5.js的“绘画系统”
查看>>
《达芬奇的人生密码》观后感
查看>>
论文翻译:《一个包容性设计的具体例子:聋人导向可访问性》
查看>>
基于“分形”编写的交互应用
查看>>
《融入动画技术的交互应用》主题博文推荐
查看>>
链睿和家乐福合作推出下一代零售业隐私保护技术
查看>>
Unifrax宣布新建SiFAB™生产线
查看>>
艾默生纪念谷轮™在空调和制冷领域的百年创新成就
查看>>
NEXO代币持有者获得20,428,359.89美元股息
查看>>
Piper Sandler为EverArc收购Perimeter Solutions提供咨询服务
查看>>
RMRK筹集600万美元,用于在Polkadot上建立先进的NFT系统标准
查看>>