kubeasz icon indicating copy to clipboard operation
kubeasz copied to clipboard

[ansible installation issue] 在部署节点安装ansible及准备ssh免密登陆

Open bingo4933 opened this issue 2 years ago • 1 comments

按照步骤执行:

curl -O https://bootstrap.pypa.io/pip/2.7/get-pip.py
python get-pip.py
python -m pip install --upgrade "pip < 21.0"

然后安装ansible

pip install ansible -i https://mirrors.aliyun.com/pypi/simple/

报错:

# pip install ansible -i https://mirrors.aliyun.com/pypi/simple/
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting ansible
  Using cached https://mirrors.aliyun.com/pypi/packages/fd/f8/071905c6a67592d0852a9f340f6ab9226861eeeb97fdf4068642b22edcf3/ansible-4.10.0.tar.gz (36.8 MB)
    ERROR: Command errored out with exit status 1:
     command: /bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rzc4nb/ansible/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rzc4nb/ansible/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-pV8ny5
         cwd: /tmp/pip-install-rzc4nb/ansible/
    Complete output (5 lines):
    /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls'
      warnings.warn(msg)
    /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    error in ansible setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我的系统版本:centos7 python版本是:2.7.5(系统自带)

麻烦问一下这个问题如何解决??

bingo4933 avatar Apr 07 '22 01:04 bingo4933

pip install setuptools -U

kenwoodjw avatar May 23 '22 10:05 kenwoodjw

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Nov 01 '22 21:11 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Nov 09 '22 21:11 github-actions[bot]