1.检测当前python版本 2.7.5
2.创建目录
mkdir /data/soft/
mkdir /data/soft/python3
cd /data/
3.下载python3.8的包
wget https://www.python.org/ftp/python/3.8.8/Python-3.8.8.tgz
4.解压
tar zxvf Python-3.8.3.tgz -C /data/soft/
5.编译设置
cd /data/soft/Python-3.8.8
./configure --prefix=/data/soft/python3
make -j2
make install -j2
6.更换旧的python软连
unlink python
rm -rf /usr/bin/python
ln -s /data/soft/python3/bin/python3.8 /usr/bin/python
ln -s /data/soft/python3/bin/pip3.8 /usr/bin/pip
7.检查
python -V