注:原有linux带2. python不用卸载

1、依赖包安装

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

这步是必须安装,要不后面pip会报错

2、下载包:可以手工从网站下载,之后ftp工具上传

https://www.python.org/ftp/python/3.8.0/

wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0a1.tgz


3、解压
tar -zxvf 文件名

安装路径 /usr/local/python3/Python-3.8.11

4、安装
cd Python-3.8.0
./configure --prefix=/usr/local/python3
make && make install

python3.8安装成功图 

linux安装python3.8_软链接

 

 

5、建立软链接

ln -s /usr/local/python3/bin/python3.8 /usr/bin/python3

ln -s /usr/local/python3/bin/pip3.8 /usr/bin/pip3

6、查看安装是否成功 

验证成功 python3和pip3

linux安装python3.8_sqlite_02

 

上班求生存,下班求发展