Scrapy爬虫学习中遇到的问题记录

环境 : python2.7 + win8 

1、报“pkg_resources.distributionnotfound:the service_identity distribution was not found”错误

      解决:pip install service-identity

pip install pydispatcher
pip install parsel


2、更新pip
python -m pip install --upgrade pip


3、Twisted>=10.0.0

pip install twisted


4、AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Use --force to continue.
Aborted due to warnings.

#################################
查看openssl版本
$ python -V
Python 2.7.13rc1

$ pip freeze | grep -iE 'crypto|ssl'  //windows上报错
asn1crypto==0.22.0
cryptography==2.0
pyOpenSSL==0.15.1

$ openssl version
OpenSSL 1.0.2g 1 Mar 2016


解决方法:把之前的pyopenssl 卸载掉,从新安装
 
pip uninstall pyopenssl
pip install pyopenssl


5、twisted文件中getHostByName出错:TypeError: 'float' object is not iterable(没解决)

解决方法:pip uninstall twisted (版本是17)


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值