Centos安裝Python3


一、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 

從上面可以看出我們可以安裝 python3python34python36。那么我以安裝python36為例子,下面是安裝python36和其對應pip的腳本:

yum install python36 python36-pip

安裝好之后就可以直接使用,運行 python3 或者 python36 或者 python3.6 命令即可,庫安裝則使用的是 pip3 或者 pip3.6 命令。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM