欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

centos 7 安装 scrapy

程序员文章站 2022-05-07 17:31:44
...
# Fix a cryptography error
yum install gcc libffi-devel python-devel openssl-devel
# Fix a lxml error
yum install libxslt-devel libxml2-devel libxml2 libxslt

Everything is ready! Install incremental and Scrapy:

pip install incremental
pip install scrapy



运行Scrapy 出现如下错误:
.......
from twisted.internet._sslverify import _setAcceptableProtocols
  File "/usr/lib64/python2.7/site-packages/twisted/internet/_sslverify.py", line 38, in <module>
    TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,
exceptions.AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'

解决办法,把twisted 版本降低:
pip install Twisted==16.4.1