pip安装scrapy

https://blog.youkuaiyun.com/zhi_neng/article/details/78994205

近日,在安装Scrapy的时候提示出现了如下的错误信息:

Scrapy安装错误:Setup script exited with error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools

导致Scrapy没有安装成功,安装的环境是:当前环境win7,python_3.6.1,64位。windows环境下,在cmd中运行pip install Scrapy报错。往上面查询安装的情况显示的是:

Best match: Twisted 17.9.0
Processing Twisted-17.9.0.tar.bz2
Writing C:\Users\ghr\AppData\Local\Temp\easy_install-q6ar7s9q\Twisted-17.9.0\setup.cfg
Running Twisted-17.9.0\setup.py -q bdist_egg --dist-dir C:\Users\ghr\AppData\Local\Temp\easy_install-q6ar7s9q\Twisted-17.9.0\egg-dist-tmp-d7wibfjn
warning: no previously-included files matching ‘.misc’ found under directory ‘src\twisted’
warning: no previously-included files matching '
.bugfix’ found under directory’src\twisted’
warning: no previously-included files matching ‘.doc’ found under directory ‘src\twisted’
warning: no previously-included files matching '
.feature’ found under directory ‘src\twisted’
warning: no previously-included files matching ‘.removal’ found under directory’src\twisted’
warning: no previously-included files matching ‘NEWS’ found under directory ‘src\twisted’
warning: no previously-included files matching ‘README’ found under directory ‘src\twisted’
warning: no previously-included files matching ‘newsfragments’ found under directory ‘src\twisted’
warning: no previously-included files found matching ‘src\twisted\topfiles\CREDITS’
warning: no previously-included files found matching ‘src\twisted\topfiles\ChangeLog.Old’
warning: no previously-included files found matching ‘pyproject.toml’
warning: no previously-included files found matching ‘codecov.yml’
warning: no previously-included files found matching ‘appveyor.yml’
no previously-included directories found matching ‘bin’
no previously-included directories found matching ‘admin’
no previously-included directories found matching ‘.travis’
warning: no previously-included files found matching ‘docs\historic\2003’
warning: no previously-included files matching '
’ found under directory ‘docs\historic\2003’

显然是Twisted 17.9.0没有安装成功导致的

解决办法:http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted 下载twisted对应版本的whl文件(如我的Twisted‑17.9.0‑cp36‑cp36m‑win_amd64.whl),cp后面是python版本,amd64代表64位,运行命令:

pip install F:\AI\python\Twisted-17.9.0-cp36-cp36m-win_amd64.whl

install后面为下载的whl文件的完整路径名,安装成功后提示:Successfully installed Twisted-17.9.0

运行下面命令:pip install Scrapy

出现:Installing collected packages: pyasn1, pyasn1-modules
Successfully installed pyasn1-0.4.2 pyasn1-modules-0.2.1 安装成功。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值