python - 安装scrapy提示openssl版本太老
阿神
阿神 2017-04-18 09:59:37
[Python讨论组]

系统centos5.10
python版本2.7.5
已经安装了scrapy所有依赖包,更新了oenpssl

更新了openssl
[root@iZbp19u6ifs6ey95jlrdqtZ ~]# openssl version
OpenSSL 1.0.1g 7 Apr 2014
这里的版本没变
python -c "import ssl; print ssl.OPENSSL_VERSION"
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
执行scrapy命令会报错
[root@iZbp19u6ifs6ey95jlrdqtZ ~]# scrapy
Traceback (most recent call last):
  File "/usr/local/bin/scrapy", line 5, in <module>
    pkg_resources.run_script('Scrapy==0.24.0', 'scrapy')
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 743, in run_script

  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1498, in run_script

  File "/usr/local/python2.7/lib/python2.7/site-packages/Scrapy-0.24.0-py2.7.egg/EGG-INFO/scripts/scrapy", line 3, in <module>
    from scrapy.cmdline import execute
  File "/usr/local/python2.7/lib/python2.7/site-packages/Scrapy-0.24.0-py2.7.egg/scrapy/cmdline.py", line 9, in <module>
    from scrapy.crawler import CrawlerProcess
  File "/usr/local/python2.7/lib/python2.7/site-packages/Scrapy-0.24.0-py2.7.egg/scrapy/crawler.py", line 3, in <module>
    from twisted.internet import reactor, defer
  File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/reactor.py", line 38, in <module>
    from twisted.internet import default
  File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/default.py", line 56, in <module>
    install = _getInstallFunction(platform)
  File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/default.py", line 44, in _getInstallFunction
    from twisted.internet.epollreactor import install
  File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/epollreactor.py", line 24, in <module>
    from twisted.internet import posixbase
  File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py", line 18, in <module>
    from twisted.internet import error, udp, tcp
  File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 28, in <module>
    from twisted.internet._newtls import (
  File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/internet/_newtls.py", line 21, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/usr/local/python2.7/lib/python2.7/site-packages/Twisted-16.6.0-py2.7-linux-x86_64.egg/twisted/protocols/tls.py", line 41, in <module>
    from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
  File "build/bdist.linux-x86_64/egg/OpenSSL/__init__.py", line 8, in <module>
    #
  File "build/bdist.linux-x86_64/egg/OpenSSL/rand.py", line 12, in <module>
  File "build/bdist.linux-x86_64/egg/OpenSSL/_util.py", line 6, in <module>
  File "/usr/local/python2.7/lib/python2.7/site-packages/cryptography-1.4-py2.7-linux-x86_64.egg/cryptography/hazmat/bindings/openssl/binding.py", line 250, in <module>
    _verify_openssl_version(Binding.lib.SSLeay())
  File "/usr/local/python2.7/lib/python2.7/site-packages/cryptography-1.4-py2.7-linux-x86_64.egg/cryptography/hazmat/bindings/openssl/binding.py", line 230, in _verify_openssl_version
    "You are linking against OpenSSL 0.9.8, which is no longer "
RuntimeError: You are linking against OpenSSL 0.9.8, which is no longer support by the OpenSSL project. You need to upgrade to a newer version of OpenSSL.
阿神
阿神

闭关修行中......

全部回复(2)
天蓬老师

建议升级Openssl的版本,具体操作可以参考这篇文章:

OpenSSL升级到最新版本

迷茫

更新升级一下就可以了

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号