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
mkdir /usr/download
cd /usr/download
wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz
tar -xvf Python-3.8.5.tgz
mkdir /usr/local/python3
pwd
cd Python-3.8.5
./configure --prefix=/usr/local/python3
make
make install
python -V
以上完成 python 的升级
下面开始配置 pip3
vim ~/.bash_profile
将/usr/local/python3/bin加入PATH# vim ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/python3/bin
完成
最后修复 yun命令
# 打开文件
vi /usr/bin/yum
# 修改
#!/usr/bin/python 改成 #!/usr/bin/python2.7
# 打开文件
vi /usr/libexec/urlgrabber-ext-down
# 修改
#!/usr/bin/python 改成 #!/usr/bin/python2.7