# 安装依赖
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
# 下载安装包
wget "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=/usr/local/python3
# 编译
make
# 安装
make install
# 建立软连接
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
标签:bin,Python3.7,Python,devel,CentOS7.9,usr,3.7,安装,python3
From: https://www.cnblogs.com/freelancy/p/17010996.html