阿里云ECS下CentOS7.4 yum安装Python3.6环境
一、安装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环境的更多相关文章
- 阿里云ECS下Ubuntu 16.04系统安装python3.6.5 环境并设置为默认
一.添加python3.6安装包并安装: 二.修改系统默认python版本为3.6: 三.安装并升级pip版本: 一.添加python3.6安装包并安装: sudo apt-get install s ...
- 阿里云ECS服务器CentOS7.2安装Python2.7.13
阿里云ECS服务器CentOS7.2安装Python2.7.13 yum中最新的也是Python 2.6.6,只能下载Python 2.7.9的源代码自己编译安装. 操作步骤如下: 检查CentOS7 ...
- [转]阿里云CentOS 7.1使用yum安装MySql5.6.24
阿里云CentOS 7.1使用yum安装MySql5.6.24 作者:vfhky | 时间:2015-06-25 09:43 | 分类:web 在前面两篇文章<2015博客升级记(四):Cent ...
- 阿里云ECS下基于Centos7.4安装MySQL5.7.20
1.首先登录阿里云ECS服务器,如下图所示: 2.卸载MariaDB 说明:CentOS7.x默认安装MariaDB而不是MySQL,而且yum服务器上也移除了MySQL相关的软件包.因为Maria ...
- 解决阿里云ECS下kubeadm部署k8s无法指定公网IP
背景 一般情况下,"kubeadm"部署集群时指定"--apiserver-advertise-address=<public_ip>"参数,即可在 ...
- 阿里云ECS服务器(G5)安装配置docker
镜像下载.域名解析.时间同步请点击 阿里云开源镜像站 前言 服务器配置:阿里云ECS服务器(G5服务器3年2核8G内存80G云盘),安装的是CentOS,内核信息:5.10.60-9.al8.x86_ ...
- 阿里云ECS服务器CentOS7配置vsftps及其问题解决
前言 之前只在虚拟机中配过FTP服务器,今天买了云服务器,发现安装vsftpd后就是连不上,通过搜索了很多资料,最后找到了解决办法,系统是CentOS7,服务器类型是ECS 阿里云安全组配置 首先进入 ...
- [linux]为阿里云ECS(CentOS7)配置IPv6地址
环境为:ECS"经典网络"类型 步骤: 1. 编辑 /etc/sysctl.conf 文件,将其中三条禁用IPv6的设置更改为: net.ipv6.conf.all.disable ...
- 阿里云ECS 实例Centos7系统磁盘扩容
需求:一台阿里云的数据盘磁盘空间不足,需要扩容,我这里只有一个主分区,ext4文件系统. 因为磁盘扩容场景不同,阿里云的文档比较全面一些,所以先奉上阿里云的文档,下面开始我的操作步骤: 1.登录控制台 ...
随机推荐
- localStorage和cookie操作
localStorage和cookie操作代码: cookie: { isSupportCookie: function() { return navigator.cookieEnabled; }, ...
- Hello, GitHub!
GitHub作为版本控制的软件,我决定重新系统学习这个东西,毕竟以前都是fork.clone... 1. 理解Git思维 首先呢,我一开始就被GitHub和Git两个东西搞昏了,所以有必要理解二者的关 ...
- 分别利用(代码,Xib,SB)创建空的App工程
1. 利用代码: 2.利用XIB: 3.利用Storyboard: Xcode 7默认该方式创建项目工程,就不必多说了!
- IOS 文件名获取简洁方式
//这里有一个模拟器沙盒路径(完整路径) NSString* index=@"/Users/junzoo/Library/Application Support/iPhone Simulat ...
- js内部事件机制--单线程原理
原文地址:https://www.xingkongbj.com/blog/js/event-loop.html http://www.haorooms.com/post/js_xiancheng ht ...
- Linux学习笔记——1.超级用户
以超级用户工作:su su命令允许临时变换到任何一用户标识(如果拥有口令的话),并挂起当前shell,为新用户开启一个新的shell. su <user> 将当前用户标识harley变换为 ...
- 【淘宝客】批量提取QQ号
1:打开QQ群官方,网址:http://qun.qq.com/ 2.点击导航栏:群管理 3.点击成员管理,选择需要提取QQ号的群 4.全选复制群成员 5.打开网址:http://tool.oschin ...
- GitLab 基本操作
登录 在浏览其中输入http://192.168.3.11:8888 如图1登录界面. 图1 注:第一次新增用户,会发送修改密码链接到用户的邮箱中,用户会收到如图2邮件. 图2 2. 修改密码 点 ...
- linux内核中的IS_ERR()、PTR_ERR()、ERR_PTR()
IS_ERR宏定义在include/linux/err.h,如下所示: #define MAX_ERRNO 4095 //判断x是不是在(0xfffff000,0xffffffff)之间,注意这里用u ...
- Zabbix 3.4.11版本 自定义监控项
一.实验思路过程 创建项目.触发器.图形,验证监控效果: Template OS Linux 模板基本涵盖了所有系统层面的监控,包括了我们最关注的 几项:ping.load.cpu 使用率.memor ...