Centos7通過yum安裝python 3.6
? Centos默認的源里面沒有python3.6,想要通過yum安裝python的話就需要導入其他yum源(EPEL)。官網地址https://fedoraproject.org/wiki/EPEL。
1.安裝EPEL源
? 參考官網的教程,輸入如下命令:
# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
2.安裝python3
# 安裝python3
yum install python36
# 使用python3
python36
3.安裝pip
# 下載get-pip.py
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
# 使用python運行腳本
python36 get-pip.py