一、安装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. 【转】SpringBoot学习笔记(7) SpringBoot整合Dubbo(使用yml配置)

    http://blog.csdn.net/a67474506/article/details/61640548 Dubbo是什么东西我这里就不详细介绍了,自己可以去谷歌 SpringBoot整合Dub ...

  2. java和spring 线程池总结

    1. spring 的线程池 ThreadPoolTaskExecutor @Configuration public class ThreadPoolConfig { @Bean("thr ...

  3. STM32之定时器输入捕获

    1.输入捕获模式可以用来测量脉冲宽度或者测量频率.STM32的定时器,除了TIM6和TIM7,其他定时器都有输入捕获功能.STM32的输入捕获,简单的说就是通过检测TIMx_CHx上的边沿信号,在边沿 ...

  4. LeetCode20.有效的括号 JavaScript

    给定一个只包括 '(',')','{','}','[',']' 的字符串,判断字符串是否有效. 有效字符串需满足: 左括号必须用相同类型的右括号闭合. 左括号必须以正确的顺序闭合. 注意空字符串可被认 ...

  5. Dokcer-ce安装脚本

    安装docker #!/bin/bash # coding: utf- # Copyright (c) set -e #返回值为0时,退出脚本 echo "1. 备份yum" { ...

  6. 使用单例模式来打造ActivityManager类

    单例(Singleton)模式 定义 单例模式是一种对象创建型模式,使用单例模式,可以保证为一个类只生成唯一的实例对象.也就是说,在整个程序空间中,该类只存在一个实例对象. GoF对单例模式的定义是: ...

  7. IPC进程间通信---共享内存

    共享内存 共享内存:共享内存就是分配一块能被其它进程访问的内存.每个共享内存段在内核中维护着一个内部结构shmid_ds, 该结构定义在头文件linux/shm.h中,其结构如下: struct sh ...

  8. git 的一些基本命令小结

    Git是目前世界上最先进的分布式版本控制系统 对于git 的用法,本文并不属于教程,只是总结记录一些平时用的简单命令 git的下载地址:https://git-scm.com/downloads 主要 ...

  9. 开发和调试第一个 LLVM Pass

    1. 下载和编译 LLVM LLVM 下载地址 http://releases.llvm.org/download.html,目前最新版是 6.0.0,下载完成之后,执行 tar 解压 llvm 包: ...

  10. ElasticSearch : APT-GET安装方式

    Ubuntu下安装ES 新建非ROOT管理员用户 安装和配置JDK 打开下面的地址 https://www.elastic.co/guide/en/elasticsearch/reference/cu ...