Python安装scrapy报错:TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,

错误内容

Traceback (most recent call last):
  File "d:\users\july_whj\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "d:\users\july_whj\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "D:\Users\July_whj\Scripts\scrapy.exe\__main__.py", line 5, in <module>
  File "d:\users\july_whj\lib\site-packages\scrapy\cmdline.py", line 9, in <module>
    from scrapy.crawler import CrawlerProcess
  File "d:\users\july_whj\lib\site-packages\scrapy\crawler.py", line 7, in <module>
    from twisted.internet import reactor, defer
  File "d:\users\july_whj\lib\site-packages\twisted\internet\reactor.py", line 38, in <module>
    from twisted.internet import default
  File "d:\users\july_whj\lib\site-packages\twisted\internet\default.py", line 56, in <module>
    install = _getInstallFunction(platform)
  File "d:\users\july_whj\lib\site-packages\twisted\internet\default.py", line 50, in _getInstallFunction
    from twisted.internet.selectreactor import install
  File "d:\users\july_whj\lib\site-packages\twisted\internet\selectreactor.py", line 18, in <module>
    from twisted.internet import posixbase
  File "d:\users\july_whj\lib\site-packages\twisted\internet\posixbase.py", line 18, in <module>
    from twisted.internet import error, udp, tcp
  File "d:\users\july_whj\lib\site-packages\twisted\internet\tcp.py", line 28, in <module>
    from twisted.internet._newtls import (
  File "d:\users\july_whj\lib\site-packages\twisted\internet\_newtls.py", line 21, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "d:\users\july_whj\lib\site-packages\twisted\protocols\tls.py", line 63, in <module>
    from twisted.internet._sslverify import _setAcceptableProtocols
  File "d:\users\july_whj\lib\site-packages\twisted\internet\_sslverify.py", line 38, in <module>
    TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,

解决方案

twisted的版本问题。执行下面语句,不用卸载。


pip install twisted==13.1.0
bug 
更新时间:2017-12-18 12:28:07

本文由 智慧煮粥 创作,如果您觉得本文不错,请随意赞赏
采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
原文链接:http://zz.zzhub.cn/archives/scrpythontw
最后更新:2017-12-18 12:28:07

评论

Your browser is out of date!

Update your browser to view this website correctly. Update my browser now

×