爬虫----090scrapy的安装

1、安装时选择国内源,国外源安装极慢

2、在我安装时出现了一些错误,在此分享一下

     【注意】需要先下载scrapy的依赖库twisted, 根据python版本选择对应的twisted库

        地址:http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted

       下载 twisted 对应版本的 whl文件(比如我的twisted_iocpsupport-1.0.2-cp38-cp38-win_amd64.whl), cp 后面是 python版本,amd64 代表 64 位。

      错误1    此处可选择更换下载源

                   我成功下载的源头为:

pip install scrapy -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com
#WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/scrapy/
# WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/scrapy/
# WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/scrapy/
# WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/scrapy/
# WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/scrapy/
# ERROR: Could not find a version that satisfies the requirement scrapy (from versions: none)
# ERROR: No matching distribution found for scrapy

        错误2    pip版本过低    升级pip版本     

           python ‐m pip install ‐‐upgrade pip

总步骤:

###在电脑终端里输入

python ‐m pip install ‐‐upgrade pip

pip D:\twisted\twisted_iocpsupport-1.0.2-cp38-cp38-win_amd64.whl    #此处写自己的库地址

pip install scrapy -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com


然后就可以你的爬虫之旅了
  • 8
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值