一、安装EPEL和IUS软件源

二、安装Python3.6

三、创建python3软链接连接符

四、安装pip3

五、创建pip3链接符

六、进行验证是否安装成功

一、安装EPEL和IUS软件源

yum install epel-release -y
yum install https://centos7.iuscommunity.org/ius-release.rpm -y

二、安装Python3.6

yum install python36u -y

三、创建python3软链接连接符

ln -s /bin/python3.6 /bin/python3

四、安装pip3

yum install python36u-pip -y

五、创建pip3链接符

ln -s /bin/pip3.6 /bin/pip3

六、进行验证是否安装成功

[root@iZ2ze776rnzxhq6p432hn5Z ~]# python
Python 2.7.5 (default, Aug 4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[root@iZ2ze776rnzxhq6p432hn5Z ~]# python2
Python 2.7.5 (default, Aug 4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[root@iZ2ze776rnzxhq6p432hn5Z ~]# python3
Python 3.6.5 (default, Apr 10 2018, 17:08:37)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[root@iZ2ze776rnzxhq6p432hn5Z ~]# pip3 -V
pip 9.0.1 from /usr/lib/python3.6/site-packages (python 3.6)
[root@iZ2ze776rnzxhq6p432hn5Z ~]# pip2 -V
pip 9.0.1 from /usr/lib/python2.7/site-packages (python 2.7)
[root@iZ2ze776rnzxhq6p432hn5Z ~]#

安装过程日志如下:

[BEGIN] 2018/7/4 20:53:21
[root@iZ2ze776rnzxhq6p432hn5Z ~]# uname -a
Linux iZ2ze776rnzxhq6p432hn5Z 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@iZ2ze776rnzxhq6p432hn5Z ~]# uname -r
3.10.0-693.2.2.el7.x86_64
[root@iZ2ze776rnzxhq6p432hn5Z ~]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[root@iZ2ze776rnzxhq6p432hn5Z ~]# yum install epel-release -y
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
epel | 3.2 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/7): epel/x86_64/updateinfo | 927 kB 00:00:00
(2/7): base/7/x86_64/group_gz | 166 kB 00:00:00
(3/7): epel/x86_64/group_gz | 88 kB 00:00:00
(4/7): epel/x86_64/primary | 3.5 MB 00:00:00
(5/7): extras/7/x86_64/primary_db | 149 kB 00:00:00
(6/7): base/7/x86_64/primary_db | 5.9 MB 00:00:00
(7/7): updates/7/x86_64/primary_db | 2.7 MB 00:00:00
Determining fastest mirrors
epel 12608/12608
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================================================================================================
Installing:
epel-release noarch 7-11 epel 15 k Transaction Summary
======================================================================================================================================================================================================================================
Install 1 Package Total download size: 15 k
Installed size: 24 k
Downloading packages:
epel-release-7-11.noarch.rpm | 15 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-11.noarch 1/1
warning: /etc/yum.repos.d/epel.repo created as /etc/yum.repos.d/epel.repo.rpmnew
Verifying : epel-release-7-11.noarch 1/1 Installed:
epel-release.noarch 0:7-11 Complete!
[root@iZ2ze776rnzxhq6p432hn5Z ~]# yum install https://centos7.iuscommunity.org/ius-release.rpm -y
Loaded plugins: fastestmirror
ius-release.rpm | 8.1 kB 00:00:00
Examining /var/tmp/yum-root-i_69wp/ius-release.rpm: ius-release-1.0-15.ius.centos7.noarch
Marking /var/tmp/yum-root-i_69wp/ius-release.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package ius-release.noarch 0:1.0-15.ius.centos7 will be installed
--> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================================================================================================
Installing:
ius-release noarch 1.0-15.ius.centos7 /ius-release 8.5 k Transaction Summary
======================================================================================================================================================================================================================================
Install 1 Package Total size: 8.5 k
Installed size: 8.5 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : ius-release-1.0-15.ius.centos7.noarch 1/1
Verifying : ius-release-1.0-15.ius.centos7.noarch 1/1 Installed:
ius-release.noarch 0:1.0-15.ius.centos7 Complete!
[root@iZ2ze776rnzxhq6p432hn5Z ~]# yum install python36u -y
Loaded plugins: fastestmirror
ius | 2.3 kB 00:00:00
ius/x86_64/primary_db | 315 kB 00:00:00
Loading mirror speeds from cached hostfile
* ius: mirrors.tongji.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package python36u.x86_64 0:3.6.5-1.ius.centos7 will be installed
--> Processing Dependency: python36u-libs(x86-64) = 3.6.5-1.ius.centos7 for package: python36u-3.6.5-1.ius.centos7.x86_64
--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python36u-3.6.5-1.ius.centos7.x86_64
--> Running transaction check
---> Package python36u-libs.x86_64 0:3.6.5-1.ius.centos7 will be installed
--> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================================================================================================
Installing:
python36u x86_64 3.6.5-1.ius.centos7 ius 57 k
Installing for dependencies:
python36u-libs x86_64 3.6.5-1.ius.centos7 ius 8.7 M Transaction Summary
======================================================================================================================================================================================================================================
Install 1 Package (+1 Dependent package) Total download size: 8.8 M
Installed size: 40 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/ius/packages/python36u-3.6.5-1.ius.centos7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 9cd4953f: NOKEY
Public key for python36u-3.6.5-1.ius.centos7.x86_64.rpm is not installed
(1/2): python36u-3.6.5-1.ius.centos7.x86_64.rpm | 57 kB 00:00:00
(2/2): python36u-libs-3.6.5-1.ius.centos7.x86_64.rpm | 8.7 MB 00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 15 MB/s | 8.8 MB 00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Importing GPG key 0x9CD4953F:
Userid : "IUS Community Project <coredev@iuscommunity.org>"
Fingerprint: 8b84 6e3a b3fe 6462 74e8 670f da22 1cdf 9cd4 953f
Package : ius-release-1.0-15.ius.centos7.noarch (installed)
From : /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python36u-libs-3.6.5-1.ius.centos7.x86_64 1/2
Installing : python36u-3.6.5-1.ius.centos7.x86_64 2/2
Verifying : python36u-3.6.5-1.ius.centos7.x86_64 1/2
Verifying : python36u-libs-3.6.5-1.ius.centos7.x86_64 2/2 Installed:
python36u.x86_64 0:3.6.5-1.ius.centos7 Dependency Installed:
python36u-libs.x86_64 0:3.6.5-1.ius.centos7 Complete!
[root@iZ2ze776rnzxhq6p432hn5Z ~]# ln -s /bin/python3.6 /bin/python3
[root@iZ2ze776rnzxhq6p432hn5Z ~]# yum install python36u-pip -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* ius: mirrors.tongji.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package python36u-pip.noarch 0:9.0.1-1.ius.centos7 will be installed
--> Processing Dependency: python36u-setuptools for package: python36u-pip-9.0.1-1.ius.centos7.noarch
--> Running transaction check
---> Package python36u-setuptools.noarch 0:39.0.1-1.ius.centos7 will be installed
--> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================================================================================================
Installing:
python36u-pip noarch 9.0.1-1.ius.centos7 ius 1.8 M
Installing for dependencies:
python36u-setuptools noarch 39.0.1-1.ius.centos7 ius 642 k Transaction Summary
======================================================================================================================================================================================================================================
Install 1 Package (+1 Dependent package) Total download size: 2.4 M
Installed size: 13 M
Downloading packages:
(1/2): python36u-setuptools-39.0.1-1.ius.centos7.noarch.rpm | 642 kB 00:00:00
(2/2): python36u-pip-9.0.1-1.ius.centos7.noarch.rpm | 1.8 MB 00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 5.7 MB/s | 2.4 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python36u-setuptools-39.0.1-1.ius.centos7.noarch 1/2
Installing : python36u-pip-9.0.1-1.ius.centos7.noarch 2/2
Verifying : python36u-setuptools-39.0.1-1.ius.centos7.noarch 1/2
Verifying : python36u-pip-9.0.1-1.ius.centos7.noarch 2/2 Installed:
python36u-pip.noarch 0:9.0.1-1.ius.centos7 Dependency Installed:
python36u-setuptools.noarch 0:39.0.1-1.ius.centos7 Complete!
[root@iZ2ze776rnzxhq6p432hn5Z ~]# ln -s /bin/pip3.6 /bin/pip3
[root@iZ2ze776rnzxhq6p432hn5Z ~]# python
Python 2.7.5 (default, Aug 4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[root@iZ2ze776rnzxhq6p432hn5Z ~]# python2
Python 2.7.5 (default, Aug 4 2017, 00:39:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[root@iZ2ze776rnzxhq6p432hn5Z ~]# python3
Python 3.6.5 (default, Apr 10 2018, 17:08:37)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[root@iZ2ze776rnzxhq6p432hn5Z ~]# pip3 -V
pip 9.0.1 from /usr/lib/python3.6/site-packages (python 3.6)
[root@iZ2ze776rnzxhq6p432hn5Z ~]# pip2 -V
pip 9.0.1 from /usr/lib/python2.7/site-packages (python 2.7)

阿里云ECS下CentOS7.4 yum安装Python3.6环境的更多相关文章

  1. 阿里云ECS下Ubuntu 16.04系统安装python3.6.5 环境并设置为默认

    一.添加python3.6安装包并安装: 二.修改系统默认python版本为3.6: 三.安装并升级pip版本: 一.添加python3.6安装包并安装: sudo apt-get install s ...

  2. 阿里云ECS服务器CentOS7.2安装Python2.7.13

    阿里云ECS服务器CentOS7.2安装Python2.7.13 yum中最新的也是Python 2.6.6,只能下载Python 2.7.9的源代码自己编译安装. 操作步骤如下: 检查CentOS7 ...

  3. [转]阿里云CentOS 7.1使用yum安装MySql5.6.24

    阿里云CentOS 7.1使用yum安装MySql5.6.24 作者:vfhky | 时间:2015-06-25 09:43 | 分类:web 在前面两篇文章<2015博客升级记(四):Cent ...

  4. 阿里云ECS下基于Centos7.4安装MySQL5.7.20

     1.首先登录阿里云ECS服务器,如下图所示: 2.卸载MariaDB 说明:CentOS7.x默认安装MariaDB而不是MySQL,而且yum服务器上也移除了MySQL相关的软件包.因为Maria ...

  5. 解决阿里云ECS下kubeadm部署k8s无法指定公网IP

    背景 一般情况下,"kubeadm"部署集群时指定"--apiserver-advertise-address=<public_ip>"参数,即可在 ...

  6. 阿里云ECS服务器(G5)安装配置docker

    镜像下载.域名解析.时间同步请点击 阿里云开源镜像站 前言 服务器配置:阿里云ECS服务器(G5服务器3年2核8G内存80G云盘),安装的是CentOS,内核信息:5.10.60-9.al8.x86_ ...

  7. 阿里云ECS服务器CentOS7配置vsftps及其问题解决

    前言 之前只在虚拟机中配过FTP服务器,今天买了云服务器,发现安装vsftpd后就是连不上,通过搜索了很多资料,最后找到了解决办法,系统是CentOS7,服务器类型是ECS 阿里云安全组配置 首先进入 ...

  8. [linux]为阿里云ECS(CentOS7)配置IPv6地址

    环境为:ECS"经典网络"类型 步骤: 1. 编辑 /etc/sysctl.conf 文件,将其中三条禁用IPv6的设置更改为: net.ipv6.conf.all.disable ...

  9. 阿里云ECS 实例Centos7系统磁盘扩容

    需求:一台阿里云的数据盘磁盘空间不足,需要扩容,我这里只有一个主分区,ext4文件系统. 因为磁盘扩容场景不同,阿里云的文档比较全面一些,所以先奉上阿里云的文档,下面开始我的操作步骤: 1.登录控制台 ...

随机推荐

  1. HDU 1029 Ignatius and the Princess IV (map的使用)

    传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1029 Ignatius and the Princess IV Time Limit: 2000/10 ...

  2. OpenFlow, SDN, and NFV

    OpenFlow An open standard to innovative protocols in production networks provides a standardized hoo ...

  3. SimpleProfile_GetParameter && SimpleProfile_SetParameter

    /********************************************************************* * @fn SimpleProfile_GetParame ...

  4. Oracle 常用脚本

    ORACLE 默认用户名密码 sys/change_on_install SYSDBA 或 SYSOPER 不能以 NORMAL 登录,可作为默认的系统管理员 system/manager SYSDB ...

  5. [ZJOI2009]假期的宿舍(二分图匹配)

    题目描述 学校放假了 · · · · · · 有些同学回家了,而有些同学则有以前的好朋友来探访,那么住宿就是一个问题.比如 A 和 B 都是学校的学生,A 要回家,而 C 来看B,C 与 A 不认识. ...

  6. C++笔记008:C++对C的扩展——命名空间 namespace基础

    原创笔记,转载请注明出处! 点击[关注],关注也是一种美德~ 第一, 命名空间的意义 命名空间是ANSIC++引入的可以由用户命名的作用域,用来处理程序中常见的同名冲突. 我认识两位叫“A”的朋友,一 ...

  7. Centos7验证Kickstart文件是否完整方法

    1.1    功能简介 CentOS 7 包含 ksvalidator 命令行程序,可使用该程序进行确认Kickstart文件.这个工具是 pykickstart 软件包的一部分.要安装pykicks ...

  8. angular常用属性大全

    Angular元素属性大全 addClass()-为每个匹配的元素添加指定的样式类名 after()-在匹配元素集合中的每个元素后面插入参数所指定的内容,作为其兄弟节点 append()-在每个匹配元 ...

  9. Java : java基础(5) Socket网络编程

    使用 DatagramSocket 创建一个 UDP协议的Socket, 用DatagramPacket创建一个数据包,可以指定ip和端口号以及包的数据,用socket.send()可以发送这个数据包 ...

  10. 入口文件 index.php 隐藏

    入口文件 index.php 隐藏 在PHP的web项目中,问了隐藏项目的开发语言,我们首先会选择把项目的入口文件index.php(如果做了特殊配置,特殊处理)在URL中隐藏掉. 当然部署中还需要隐 ...