【问题标题】:tflearn - <type 'exceptions.AttributeError'>: 'module' object has no attribute 'PROTOCOL_SSLv3'tflearn - <type 'exceptions.AttributeError'>:'module' 对象没有属性 'PROTOCOL_SSLv3'
【发布时间】:2018-01-10 13:35:45
【问题描述】:

尝试在 python 中为 tflearn 执行帮助的基本操作时出现此错误。

我想知道这是什么原因以及如何解决它。

谢谢!

Python 2.7.12 (default, Nov 20 2017, 18:23:56) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help('tflearn')
problem in tflearn - <type 'exceptions.AttributeError'>: 'module' object has no attribute 'PROTOCOL_SSLv3'

【问题讨论】:

  • 试试这个:sudo pip install --upgrade beautifulsoup4; sudo pip install --upgrade html5lib; sudo pip install spry.
  • 厌倦了这个,但仍然得到同样的错误。
  • 您使用的是requests 包吗?在肯定的情况下,尝试:sudo pip install --upgrade requests.
  • 神奇!有效!感谢您的帮助....但是您能帮我理解为什么会出现此错误吗?
  • 我读到旧版本中 requests 包的依赖存在问题。

标签: python ubuntu tflearn


【解决方案1】:

在 Internet 上搜索找到了两种可能的解决方案:

sudo pip install --upgrade requests

这将升级requests 包,修复与此包的旧版本依赖项相关的问题。

或者升级以下包解决了其他人的问题:

sudo pip install --upgrade beautifulsoup4
sudo pip install --upgrade html5lib
sudo pip install spry

希望对你有帮助。

【讨论】:

    猜你喜欢
    • 2015-09-17
    • 1970-01-01
    • 2017-12-02
    • 1970-01-01
    • 2016-11-09
    • 2014-04-26
    • 2021-01-15
    • 2011-12-02
    • 2015-05-16
    相关资源
    最近更新 更多