CentOS7.6更新python3.8本版

系统环境: CentOS7.6
系统状态: 关闭selinux、firewalld
安装依赖包:[root@rhel7 Python-3.8.0]# yum install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel
(重启)

删除原有的python2.7
[root@rhel7 user1]# rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps

[root@rhel7 user1]# whereis python|xargs rm -frv

一、下载python3.8版本
[root@rhel7 Python-3.8.0]# wget http://npm.taobao.org/mirrors/python/3.8.0/Python-3.8.0.tgz

二、解压
[root@rhel7 Python-3.8.0]# tar -xzf Python-3.8.0.tgz

三、进入解压后的目录并预设值
[root@rhel7 Python-3.8.0]# ./configure --prefix=/usr/local/python3.8

四、编译并安装
[root@rhel7 Python-3.8.0]# make && make install

猜你喜欢

转载自blog.51cto.com/kangxi/2532699