centos 7.5安装python3.8.7

1.解压python

tar -zxvf Python-3.8.7.tgz 
mv Python-3.8.7 python-3.8.7
cd python-3.8.7

2.创建安装目标目录

mkdir /usr/local/python3

3.安装依赖

yum -y install zlib*
yum -y install libffi-devel

4.编译

./configure --prefix=/usr/local/python3
make && make install
如果觉得我的文章对你有用,请随意赞赏