1.Linux上安装所需依赖
yum update
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
yum install gcc build-essential
yum install gcc gcc-c++ autoconf automake
2.Linux上安装python 3.8.0
wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
3.解压包
tar -zxvf Python-3.8.0.tgz
4.安装python
./configure
cd Python-3.8.0
make && make install
5.修改别名(Linux默认安装 python2.7)
alias python='/usr/bin/python3'
6.查看版本
python --version