Centos8 升级python3.6版本到python3.9
下载Python3.9.5
1:wget https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tgz
2:tar zxvf Python-3.9.5.tgz
安装必须的包
3:dnf -y install gcc zlib* libffi-devel
4:cd Python-3.9.5/
5:./configure --prefix=/usr/local/python3 --enable-optimizations
6:make
7:make install
删除原先的Python3和pip3
8:rm -rf /usr/bin/python3
9:ln -s /usr/local/python3/bin/python3 /usr/bin/python3
10:rm -rf /usr/bin/pip3
11:ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3