1. yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-develdb4-devel libpcap-devel xz-devel gcc
    2. mkdir /usr/download
    3. cd /usr/download
    4. wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz
    5. tar -xvf Python-3.8.5.tgz
    6. mkdir /usr/local/python3
    7. pwd
    8. cd Python-3.8.5
    9. ./configure --prefix=/usr/local/python3
    10. make
    11. make install
    12. python -V
    13. 以上完成 python 的升级
    14. 下面开始配置 pip3
    15. vim ~/.bash_profile
    16. 将/usr/local/python3/bin加入PATH# vim ~/.bash_profile
    17. PATH=$PATH:$HOME/bin:/usr/local/python3/bin
    18. 完成

    最后修复 yun命令

    1. # 打开文件
    2. vi /usr/bin/yum
    3. # 修改
    4. #!/usr/bin/python 改成 #!/usr/bin/python2.7
    5. # 打开文件
    6. vi /usr/libexec/urlgrabber-ext-down
    7. # 修改
    8. #!/usr/bin/python 改成 #!/usr/bin/python2.7