安装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 
  File "d:\users\july_whj\lib\site-packages\scrapy\cmdline.py", line 9, in 
    from scrapy.crawler import CrawlerProcess
  File "d:\users\july_whj\lib\site-packages\scrapy\crawler.py", line 7, in 
    from twisted.internet import reactor, defer
  File "d:\users\july_whj\lib\site-packages\twisted\internet\reactor.py", line 38, in 
    from twisted.internet import default
  File "d:\users\july_whj\lib\site-packages\twisted\internet\default.py", line 56, in 
    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 
    from twisted.internet import posixbase
  File "d:\users\july_whj\lib\site-packages\twisted\internet\posixbase.py", line 18, in 
    from twisted.internet import error, udp, tcp
  File "d:\users\july_whj\lib\site-packages\twisted\internet\tcp.py", line 28, in 
    from twisted.internet._newtls import (
  File "d:\users\july_whj\lib\site-packages\twisted\internet\_newtls.py", line 21, in 
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "d:\users\july_whj\lib\site-packages\twisted\protocols\tls.py", line 63, in 
    from twisted.internet._sslverify import _setAcceptableProtocols
  File "d:\users\july_whj\lib\site-packages\twisted\internet\_sslverify.py", line 38, in 
    TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,

解决方案

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


pip install twisted==13.1.0 才成功 

你可能感兴趣的:(python爬虫入门)