適用於Centos6/7python
一、配置好epel源和ius源centos
yum install https://centos6.iuscommunity.org/ius-release.rpm -y
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repopython2.7
yum install https://centos7.iuscommunity.org/ius-release.rpm -yide
二、安裝Python3.6url
yum install python36u -ycentos7
ln -s /usr/bin/python3.6 /bin/python3ip
三、安裝pip3get
yum install python36u-pip -yit
pip安裝yum報錯問題pip
三、yum 使用的是python2.7,因此升級後會致使yum 不能用, 需修改一下2個文件 第一行的 python 的聲明
下面兩行目錄文件 #! /usr/bin/python 修改成 #! /usr/bin/python2.7
/usr/libexec/urlgrabber-ext-down
/usr/bin/yum
ln -s /usr/bin/pip3.6 /bin/pip3
pip3 install --upgrade pip