CentOS7 yum安裝python3.6node
[root@node1 ~]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core)
依賴epel源python
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install python36 -y
依賴:python36-libspython2.7
# 搜索pip3的安裝包名稱 yum whatprovides pip3 # 安裝pip3 yum install python36-pip -y
依賴:python36-setuptoolside
[root@node1 ~]# python3 --version Python 3.6.8
[root@node1 ~]# ll /usr/bin/python lrwxrwxrwx. 1 root root 7 5月 13 23:21 /usr/bin/python -> python2 [root@node1 ~]# [root@node1 ~]# ll /usr/bin/python2* lrwxrwxrwx. 1 root root 9 5月 13 23:21 /usr/bin/python2 -> python2.7 -rwxr-xr-x. 1 root root 7216 10月 31 2018 /usr/bin/python2.7 [root@node1 ~]# [root@node1 ~]# ll /usr/bin/python3* lrwxrwxrwx 1 root root 9 5月 20 17:48 /usr/bin/python3 -> python3.6 lrwxrwxrwx 1 root root 18 5月 20 17:48 /usr/bin/python36 -> /usr/bin/python3.6 -rwxr-xr-x 2 root root 11408 4月 26 05:05 /usr/bin/python3.6 -rwxr-xr-x 2 root root 11408 4月 26 05:05 /usr/bin/python3.6m [root@node1 ~]#
由上可知python
表明CentOS7系統默認的 python2.7
;python3
表明新安裝的 python3.6
工具
安裝python開發工具開發工具
yum install python36-devel -y