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