【python】install python 2.7.9

CentOS 7.1  自带 python 2.7.5, 存在sslv3验证的问题,需要通过升级来解决

///

/// 新系统自带的 Python

///

[[email protected] tools]# python -V

Python 2.7.5

[[email protected] tools]# which python

/usr/bin/python

[[email protected] tools]#

///

/// 利用 yum 升级 python

///

[[email protected] ~]# yum update python

已加载插件:fastestmirror, langpacks

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Repository contrib is listed more than once in the configuration

base                                                     | 3.6 kB     00:00

extras                                                   | 3.4 kB     00:00

updates                                                  | 3.4 kB     00:00

(1/4): base/7/x86_64/group_gz                              | 155 kB   00:00

(2/4): extras/7/x86_64/primary_db                          |  90 kB   00:00

(3/4): updates/7/x86_64/primary_db                         | 935 kB   00:03

(4/4): base/7/x86_64/primary_db                            | 5.3 MB   00:06

Loading mirror speeds from cached hostfile

* base: mirrors.aliyun.com

* extras: mirrors.aliyun.com

* updates: mirrors.aliyun.com

正在解决依赖关系

--> 正在检查事务

---> 软件包 python.x86_64.0.2.7.5-18.el7_1.1 将被 升级

---> 软件包 python.x86_64.0.2.7.5-34.el7 将被 更新

--> 正在处理依赖关系 python-libs(x86-64) = 2.7.5-34.el7,它被软件包 python-2.7.5-34.el7.x86_64 需要

--> 正在检查事务

---> 软件包 python-libs.x86_64.0.2.7.5-18.el7_1.1 将被 升级

---> 软件包 python-libs.x86_64.0.2.7.5-34.el7 将被 更新

--> 解决依赖关系完成

依赖关系解决

================================================================================

Package              架构            版本                  源             大小

================================================================================

正在更新:

python               x86_64          2.7.5-34.el7          base           88 k

为依赖而更新:

python-libs          x86_64          2.7.5-34.el7          base          5.6 M

事务概要

================================================================================

升级  1 软件包 (+1 依赖软件包)

总下载量:5.7 M

Is this ok [y/d/N]: y

Downloading packages:

No Presto metadata available for base

(1/2): python-2.7.5-34.el7.x86_64.rpm                      |  88 kB   00:00

(2/2): python-libs-2.7.5-34.el7.x86_64.rpm                 | 5.6 MB   00:09

--------------------------------------------------------------------------------

总计                                               587 kB/s | 5.7 MB  00:09

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

正在更新    : python-libs-2.7.5-34.el7.x86_64                             1/4

正在更新    : python-2.7.5-34.el7.x86_64                                  2/4

清理        : python-2.7.5-18.el7_1.1.x86_64                              3/4

清理        : python-libs-2.7.5-18.el7_1.1.x86_64                         4/4

验证中      : python-libs-2.7.5-34.el7.x86_64                             1/4

验证中      : python-2.7.5-34.el7.x86_64                                  2/4

验证中      : python-2.7.5-18.el7_1.1.x86_64                              3/4

验证中      : python-libs-2.7.5-18.el7_1.1.x86_64                         4/4

更新完毕:

python.x86_64 0:2.7.5-34.el7

作为依赖被升级:

python-libs.x86_64 0:2.7.5-34.el7

完毕!

[[email protected] ~]#

[[email protected] tools]# python -V

Python 2.7.5

[[email protected] tools]# which python

/usr/bin/python

[[email protected] tools]#

yum update python 升级之后,还是 2.7.5

[[email protected] bin]# ls -alh python*

lrwxrwxrwx. 1 root root    7 12月 15 20:19 python -> python2

lrwxrwxrwx. 1 root root    9 12月 15 20:19 python2 -> python2.7

-rwxr-xr-x. 1 root root 7.0K 11月 20 10:01 python2.7

[[email protected] bin]# ./python2 -V

Python 2.7.5

[[email protected] bin]# ./python -V

Python 2.7.5

[[email protected] bin]#

///

/// 下载源码包

///

# wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz

# yum install gcc

# yum install gcc-c++

yum install zlib-devel
yum install bzip2-devel
yum install openssl-devel
yum install ncurses-devel
yum install sqlite-devel

# ./configure

# make

# make install

# make clean

[[email protected] tools]# python -V

Python 2.7.9

[[email protected] tools]# which python

/usr/local/bin/python

[[email protected] tools]#

时间: 2024-08-10 23:29:56

【python】install python 2.7.9的相关文章

问道python之基础篇【一】 认识python

问道python之基础篇[一] 认识python 1.python的简介 1.1.什么是python? Python是一种面向对象.解释型计算机程序设计语言,由Guido van Rossum于1989年发明,第一个公开发行版发行于1991年. Python语法简洁清晰,特色之一是强制用空白符作为语句缩进. Python具有丰富和强大的库.它常被昵称为胶水语言,能够用其他语言制作的各种模块(尤其是C++)很轻松地联结在一起. 1.2.python的特点 简单,易学,免费.开源,高层语言,移植性,

【Python】用Python的“结巴”模块进行分词

之前都是用计算所的分词工具进行分词,效果不错但是比较麻烦,最近开始用Python的"结巴"模块进行分词,感觉非常方便.这里将我写的一些小程序分享给大家,希望对大家有所帮助. 下面这个程序是对一个文本文件里的内容进行分词的程序:test.py #!/usr/bin/python #-*- encoding:utf-8 -*- import jieba #导入jieba模块 def splitSentence(inputFile, outputFile): fin = open(input

【整理】各种Python的IDE(集成开发环境)的总结和对比

原地址:http://www.tuicool.com/articles/rMVJNn 原文  http://www.crifan.com/summary_common_python_ide_pyscripter_ulipad_eclipse_pydev_eric/ 背景 之前已经写帖子,解释了关于Python的开发环境: [整理][多图详解]如何在Windows下开发Python:在cmd下运行Python脚本,如何使用Python Shell(command line模式和GUI模式),如何使

【译】使用python创建一个简单的restful风格的webservice应用

这是一个如何使用python快速构建简单restful风格webservice的应用教程. 1.分析rest路由规则 rest风格的服务通常使用web.py来创建服务器端脚本,一般情况下包含两个url路径: 一个是为了查询所有用户,一个是为了查询单个用户. 例如下面的url: http://localhost:8080/users http://localhost:8080/users/{id} 2.搭建web.py环境 首先你应该安装web.py模块到你的python环境下.如果你之前没有的话

【转】浅析python 中__name__ = '__main__' 的作用

原文链接:http://www.jb51.net/article/51892.htm 举例说明解释的非常清楚,应该是看到的类似博文里面最简单的一篇: 这篇文章主要介绍了python 中__name__ = '__main__' 的作用,对于初学者来说很有帮助,需要的朋友可以参考下 很多新手刚开始学习python的时候经常会看到python 中__name__ = \'__main__\' 这样的代码,可能很多新手一开始学习的时候都比较疑惑,python 中__name__ = '__main__

【机器学习】多项式回归python实现

[机器学习]多项式回归原理介绍 [机器学习]多项式回归python实现 [机器学习]多项式回归sklearn实现 使用python实现多项式回归,没有使用sklearn等机器学习框架,目的是帮助理解算法的原理. 使用一个简单的数据集来模拟,只有几条数据. 代码 从数据集中读取X和y. 为X添加二次方项,用Z替换. 给Z添加 1 列,初始化为 1 ,用来求偏置项. 划分训练集和测试集. 将Z和y的训练集转换为矩阵形式. 和线性回归类似,使用正规方程法,先验证矩阵的可逆性. 去掉Z中全为1的列. 使

【转】install intel wireless 3165 driver for ubuntu 14.04.3

[转]install intel wireless 3165 driver for ubuntu 14.04.3 Ubuntu 14.04.3 with 3.19 kernel can’t drive the new Intel Wireless 3165 AC with firmware version 13.This is about how to install the driver mannually. Today I changed a new Dell vastro 5000 ser

Python高手之路【一】初识python

Python简介 1:Python的创始人 Python (英国发音:/?pa?θ?n/ 美国发音:/?pa?θɑ?n/), 是一种解释型.面向对象.动态数据类型的高级程序设计语言,由荷兰人Guido van Rossum于1989年发明,第一个公开发行版发行于1991年. python的创始人为吉多·范罗苏姆(Guido van Rossum).1989年的圣诞节期间,吉多·范罗苏姆为了在阿姆斯特丹打发时间,决心开发一个新的脚本解释程序,作为ABC语言的一种继承. Python社区的人赋予他"

Python开发系列【1】:初识Python

Python简介 Python的前世今生: Python诞生于1989年的圣诞节期间,其作者是吉多·范罗苏姆(Guido van Rossum).当时Guido(江湖人称龟叔)在阿姆斯特丹度假时着手开发一个新的脚本解释程序,用以打发无聊时光. 如表1,在TIOBE社区发布的最新编程语言排行榜TIOBE index,Python稳居第五名,早已超越"宇宙最好语言PHP~",其受欢迎程度不言而喻,而且由于且简洁容易入门,在美国.加拿大.澳大利亚等国家官方推荐14岁以上青年学习Python.