阿里云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.登录控制台 ...
随机推荐
- HDU 1207 汉诺塔II (找规律,递推)
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1207 汉诺塔II Time Limit: 2000/1000 MS (Java/Others) ...
- 如何设置ASP.NET页面的运行超时时间 (转载)
全局超时时间 服务器上如果有多个网站,希望统一设置一下超时时间,则需要设置 Machine.config 文件中的 ExecutionTimeout 属性值.Machine.config 文件位于 % ...
- sharepoint2016安装OOS,OOS场负载均衡
Office Online Server is the successor to Office Web Apps Server. It may be connected to SharePoint, ...
- 常见的springmvc、SpringBoot的注解
springMvc的常用注解 : @Controller :用于标记在一个类上,使用它标记的类就是一个springmcv Controller对象,分发处理器将会扫描使用了该注解 的类的方法,并检测该 ...
- linux系统的介绍与环境搭建准备38-40
操作系统(OS):用于控制管理计算机,形成在用户和机器之间传递信息的系统软件 linux是什么? <--unix系统是linux的前身---> 特点: 开放的源代码,自由修改 自由传播,没 ...
- 入口文件 index.php 隐藏
入口文件 index.php 隐藏 在PHP的web项目中,问了隐藏项目的开发语言,我们首先会选择把项目的入口文件index.php(如果做了特殊配置,特殊处理)在URL中隐藏掉. 当然部署中还需要隐 ...
- django基本配置项-5
目录 BASE_DIR 项目路径 DEBUG 模式 ROOT_URLCONF DATABASES 数据库设置 国际化 静态文件 访问静态文件示例 ALLOWED_HOSTS TEMPLATES 模板设 ...
- select epoll poll
如何理解 Epoll select 和 poll 三种模型,能否用生活中的例子做比喻? 比如说你从某宝下单买了几个东西,这几个东西分别由N个快递员分别给你送过来.在某一时刻,你开始等快递.对于sele ...
- IA64与x86-64的区别
win7 sp1下载地址:https://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/wind ...
- python中的__all__
在定义一个模块的时候,在开头处加上 “ __all__ = ["xxx1", "xxx2"] ”(xxx可以是方法.类.变量等希望让外界访问的值),那么在外部通 ...