centos6.5安装python3.6.9/3.7.9
安装Python-3.6.9
下载python:https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz
tar -zxvf Python-3.6.9.tgz
cd Python-3.6.9
./configure --prefix=/opt/python3.6
make
make install
echo "/opt/python3.6/lib" > /etc/ld.so.conf.d/python3.6.9.conf
ldconfig
ln -s /opt/python3.6/bin/python3 /usr/local/bin/python3.6
ln -s /opt/python3.6/bin/pip3 /usr/local/bin/pip3.6
安装Python-3.7.9
下载:https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz
tar -zxvf Python-3.7.9.tgz
cd Python-3.7.9
./configure --prefix=/opt/python3.7
make
make install
#添加环境变量
vim /etc/profile
#在末尾添加路径后保存退出
export PATH=$PATH:/opt/python3.7/bin
#使其生效
source /etc/profile