本文介绍了安装elastic-search-curator时的Python pip包RequestsDependencyWarning的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过以下命令安装了弹性搜索策展人.

I installed elastic search curator via the following command.

sudo pip install -U elasticsearch-curator

一切都安装好了.

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

However now when I do the following

curator_cli --version

我收到以下依赖项警告.

I get the following dependency warning.

 /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

我该如何解决警告或将其隐藏?

How do I either fix the warning or hide it?

推荐答案

因此,我花了一些时间来使它正常工作.

So took a couple of things for me to get this working.

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

First I upgraded cyptography as per Mufeeds suggestion

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来解决此问题

Resolved this by resintalling PyOpenSSL

sudo python -m easy_install --upgrade pyOpenSSL

计算器现在可以按预期运行,而不会显示警告

Curator is now working as expected without the warnings

curator_cli --version
> curator_cli, version 5.5.4

这篇关于安装elastic-search-curator时的Python pip包RequestsDependencyWarning的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 06:16