我通过以下命令安装了弹性搜索策展器。
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
如何修复警告或隐藏警告?
所以我花了几件事才完成这项工作。
首先,我根据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
下面的第一步将更新密码学,但会破坏pyopenssl。
sudo pip install --upgrade cryptography
我们可以通过删除pyopennssl库并使用pip重新安装来解决这个问题。
sudo rm -rf /usr/lib/python2.7/dist-packages/OpenSSL
sudo rm -rf /usr/lib/python2.7/dist-packages/pyOpenSSL-0.15.1.egg-info
sudo pip install pyopenssl --upgrade
sudo pip install cryptography --upgrade
如果打开的sll库仍然被破坏,最后一行将产生错误,因此这验证了一切都应该正常。。。
我的偏好是避免另一个软件包像在混合中轻松安装一样管理,所以在其他人也喜欢的情况下共享它。