一尘不染

安装elastic-search-curator时的Python pip包RequestsDependencyWarning

elasticsearch

我通过以下命令安装了elasticsearch策展人。

sudo pip install -U elasticsearch-curator

一切都安装好了。

但是现在当我执行以下操作时

curator_cli --version

我得到以下依赖警告。

 /usr/local/lib/python2.7/dist-packages/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
curator_cli, version 5.5.4

如何解决警告或隐藏警告?


阅读 356

收藏
2020-06-22

共1个答案

一尘不染

因此,我花了两件事才能使它正常工作。

首先,我根据Mufeeds建议升级了密码术

sudo pip install --upgrade cryptography

这每次给我一个新的错误 pip <any command>

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 7, in <module>
    from pip._internal import main
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/__init__.py", line 42, in <module>
    from pip._internal import cmdoptions
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cmdoptions.py", line 16, in <module>
    from pip._internal.index import (
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/index.py", line 15, in <module>
    from pip._vendor import html5lib, requests, six
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py", line 86, in <module>
    from pip._vendor.urllib3.contrib import pyopenssl
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
    SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

通过树脂密封PyOpenSSL解决了此问题

sudo python -m easy_install --upgrade pyOpenSSL

馆长现在正在按预期工作,没有警告

curator_cli --version
> curator_cli, version 5.5.4
2020-06-22