美文网首页
CentOS7.6_64 升级python

CentOS7.6_64 升级python

作者: 善良能当饭吃吗 | 来源:发表于2019-05-30 13:29 被阅读0次

1:#升级前的准备工作,安装wget和3.6的tar包

yum -y install wget 

mkdir /usr/local/python3 

cd /usr/local/python3

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

tar xvf Python-3.6.3.tgz 

cd Python-3.6.3

./configure --prefix=/usr/local/python3

make && make install 

2:#备份python2.7 版本

cd /usr/bin

ll python*

mv python python.bak

3:#安装python3

cd /usr/bin

ln -s /usr/local/python3/bin/python3 /usr/bin/python

vim /usr/bin/yum

修改#!/usr/bin/python 为/usr/bin/python2.7

vim /usr/libexec/urlgrabber-ext-down 

修改#!/usr/bin/python 为/usr/bin/python2.7

测试yum 成功

相关文章

网友评论

      本文标题:CentOS7.6_64 升级python

      本文链接:https://www.haomeiwen.com/subject/zugmtctx.html