如下所示,我们从没有网络的本地文件夹中安装了ansible(脱机),>
pip install --no-index --find-links /var/tmp ansible-2.9.9.tar.gz 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 Looking in links: /var/tmp Processing ./ansible-2.9.9.tar.gz Processing ./Jinja2-2.11.2-py2.py3-none-any.whl Requirement already satisfied: PyYAML in /usr/lib64/python2.7/site-packages (from ansible==2.9.9) (3.12) Processing ./cryptography-2.9.2-cp27-cp27mu-manylinux1_x86_64.whl Processing ./MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl Processing ./cffi-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl Processing ./enum34-1.1.10-py2-none-any.whl Requirement already satisfied: six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography->ansible==2.9.9) (1.9.0) Processing ./ipaddress-1.0.23-py2.py3-none-any.whl Processing ./pycparser-2.20-py2.py3-none-any.whl Using legacy setup.py install for ansible, since package 'wheel' is not installed. Installing collected packages: MarkupSafe, jinja2, pycparser, cffi, enum34, ipaddress, cryptography, ansible Running setup.py install for ansible ... done Successfully installed MarkupSafe-1.1.1 ansible-2.9.9 cffi-1.14.0 cryptography-2.9.2 enum34-1.1.10 ipaddress-1.0.23 jinja2-2.11.2 pycparser-2.20
。
ansible --version ansible 2.9.9 config file = None configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Oct 11 2015, 17:47:16) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]
万一我们要还原ansible安装(通过pip卸载ansible)该怎么办
是否可以还原? ( 卸载 ) ?
我们从没有网络的本地文件夹中安装了ansible(脱机),因为以下pip install --no-index --find-links / var / tmp ansible-2.9.9.tar.gz版本说明:Python 2.7到了最后的...
您是否尝试过pip uninstall ansible
?