一、epel 源安裝
首先安裝epel源:
yum install epel-release
在有epel源的情況下查詢yum的python3狀況:
Repository epel is listed more than once in the configuration
abrt-addon-python3.noarch 2.1.11-50.el7 epel
boost-python36.x86_64 1.53.0-30.el7 epel
boost-python36-devel.x86_64 1.53.0-30.el7 epel
boost-python36-static.x86_64 1.53.0-30.el7 epel
boost169-mpich-python3.x86_64 1.69.0-2.el7 epel
boost169-mpich-python3-devel.x86_64 1.69.0-2.el7 epel
從上面可以看出我們可以安裝 python3
,python34
,python36
。那么我以安裝python36為例子,下面是安裝python36和其對應pip的腳本:
yum install python36 python36-pip
安裝好之后就可以直接使用,運行 python3
或者 python36
或者 python3.6
命令即可,庫安裝則使用的是 pip3
或者 pip3.6
命令。