执行 scrapy爬虫 You do not have a working installation of the service_identity module:

在执行 scrapy crawl domz时,警告:

:0: UserWarning: You do not have a working installation of the service_identity module: 'cannot import name 'opentype''.  Please install it from <https://pypi.python.org/pypi/service_identity> and make sure all of its dependencies are satisfied.  Without the service_identity module, Twisted can perform only rudimentary TLS client hostname verification.  Many valid certificate/hostname mappings may be rejected.


但是不管是 从提示的网址 https://pypi.python.org/pypi/service_identity 下载*.whl安装,还是直接用 pip install service_identity 指令都不行, 

一直提示红色字:

pyasn1-modules 0.2.1 has requirement pyasn1<0.5.0,>=0.4.1, but you'll have pyasn1 0.1.9 which is incompatible.


这时候想,既然是 pyasn1 的默认版本 太低(0.1.9),那就升级,

pip install pyasn1-modules(网上也有其他的指令都是错的)

最后在执行,安装 pip install service_identity .

搞定,不会警告了。

扫描二维码关注公众号,回复: 5005398 查看本文章

猜你喜欢

转载自blog.csdn.net/ksx_120999/article/details/80012650