# 查看操作系统
[root@python ~]# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
# 创建存储Python3文件夹
mkdir -p /home/downloads/tools/python3.6.8
# 安装yumdownloader工具
yum -y install yum-utils
# 下载ansible软件及依赖包
yumdownloader --resolve --destdir /home/downloads/tools/python3.6.8 python3
# 将所有依赖打包,U盘拷到内网
[root@python python3.6.8]# tar -czvf python3.tar.gz python3.6.8
[root@python python3.6.8]# pwd
/home/downloads/tools/python3.6.8
[root@python python3.6.8]# ll
总用量 9736
-rw-r--r-- 1 root root 91396 8月 23 2019 libtirpc-0.2.4-0.16.el7.x86_64.rpm
-rw-r--r-- 1 root root 71072 4月 4 2020 python3-3.6.8-13.el7.x86_64.rpm
-rw-r--r-- 1 root root 7301744 4月 4 2020 python3-libs-3.6.8-13.el7.x86_64.rpm
-rw-r--r-- 1 root root 1847392 8月 23 2019 python3-pip-9.0.3-5.el7.noarch.rpm
-rw-r--r-- 1 root root 644052 8月 23 2019 python3-setuptools-39.2.0-10.el7.noarch.rpm
# 安装所有的rpm包
[root@python python3.6.8]# rpm -ivh *.rpm
依赖包下载网址:https://centos.pkgs.org/
libtirpc-0.2.4-0.16.el7.x86_64.rpm
python3-libs-3.6.8-13.el7.x86_64.rpm
python3-3.6.8-13.el7.x86_64.rpm
python3-pip-9.0.3-5.el7.noarch.rpm
python3-setuptools-39.2.0-10.el7.noarch.rpm