Python Urllib 上下文版本冲突

Python Urllib ContextualVersionConflict

直到 10 月 20 日,一切都很好。 10 月 21 日,它失败并显示以下消息。谁能帮忙

     command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-i8sl36tr/elasticsearch-curator/setup.py'"'"'; __file__='"'"'/tmp/pip-install-i8sl36tr/elasticsearch-curator/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-et0c4kgw
         cwd: /tmp/pip-install-i8sl36tr/elasticsearch-curator/
    Complete output (20 lines):
    Traceback (most recent call last):
      File "/tmp/pip-install-i8sl36tr/elasticsearch-curator/setup.py", line 39, in <module>
        from cx_Freeze import setup, Executable
    ModuleNotFoundError: No module named 'cx_Freeze'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-i8sl36tr/elasticsearch-curator/setup.py", line 177, in <module>
        tests_require = ["mock", "nose", "coverage", "nosexcover"]
      File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 676, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 775, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.ContextualVersionConflict: (urllib3 1.24.3 (/tmp/pip-install-i8sl36tr/elasticsearch-curator/.eggs/urllib3-1.24.3-py3.7.egg), Requirement.parse('urllib3<1.26,>=1.25.4'), {'botocore'})
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.```

您的Python环境似乎与您的软件包要求的版本不一致。您是否尝试过使用 --use-feature=2020-resolver 标志安装您的环境?

python -m pip install --use-feature=2020-resolver elasticsearch elasticsearch-curator ...

2020 年 10 月 19 日,AWS 发布了新的 botocore 版本 1.19.0。 到目前为止,版本 1.19.0、1.19.1、1.19.2 与 elasticsearch-curator - 版本 5.8.1 不兼容。 通过安装旧版本的 elasticsearch-curator - 5.6.0 版,我遇到了同样的问题和临时修复的问题。 我相信 AWS 很快就会发布与 elasticsearch-curator - 版本 5.8.1.

兼容的 botocore 版本