"Python" Install Python 2.7.9

Source: Internet
Author: User
Tags install openssl aliyun

CentOS 7.1 comes with Python 2.7.5, there are sslv3 validation issues that need to be resolved by upgrading


///

Python from the new system

///

[Email protected] tools]# python-v

Python 2.7.5

[[email protected] tools]# which python

/usr/bin/python

[Email protected] tools]#


///

Upgrade Python with Yum

///

[[email protected] ~]# Yum update python

Loaded plugins: 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

(quarter): Base/7/x86_64/group_gz | 155 KB 00:00

(2/4): extras/7/x86_64/primary_db | 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

Resolving dependencies

--Checking transactions

---> Package python.x86_64.0.2.7.5-18.el7_1.1 will be upgraded

---> Package python.x86_64.0.2.7.5-34.el7 will be updated

--Is processing dependency python-libs (x86-64) = 2.7.5-34.el7, which is required by the package python-2.7.5-34.el7.x86_64

--Checking transactions

---> Package python-libs.x86_64.0.2.7.5-18.el7_1.1 will be upgraded

---> Package python-libs.x86_64.0.2.7.5-34.el7 will be updated

--Resolve dependency completion


Dependency resolution


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

Package schema version Source size

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

Being updated:

Python x86_64 2.7.5-34.el7 Base K

Update for dependencies:

Python-libs x86_64 2.7.5-34.EL7 Base 5.6 M


Transaction summary

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

Upgrade 1 packages (+1 dependent packages)


Total Downloads: 5.7 M

Is this OK [y/d/n]: Y

Downloading packages:

No Presto metadata available for base

(a): python-2.7.5-34.el7.x86_64.rpm | KB 00:00

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

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

Total 587 kb/s | 5.7 MB 00:09

Running transaction Check

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Updating: python-libs-2.7.5-34.el7.x86_64 1/4

Updating: python-2.7.5-34.el7.x86_64 2/4

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

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

Verified in: python-libs-2.7.5-34.el7.x86_64 1/4

Verified in: python-2.7.5-34.el7.x86_64 2/4

Verified in: python-2.7.5-18.el7_1.1.x86_64 3/4

Verified in: python-libs-2.7.5-18.el7_1.1.x86_64 4/4


Update Complete:

Python.x86_64 0:2.7.5-34.EL7


As dependencies are upgraded:

Python-libs.x86_64 0:2.7.5-34.EL7


Complete!

[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 after upgrade, or 2.7.5


[Email protected] bin]# Ls-alh python*

lrwxrwxrwx. 1 root root 7 December 20:19 python--Python2

lrwxrwxrwx. 1 root root 9 December 20:19 Python2-python2.7

-rwxr-xr-x. 1 root root 7.0K November 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]#


///

Download the source Package

///

# 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-develyum install Bzip2-develyum install Openssl-develyum install Ncurses-develyum 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]#


"Python" Install Python 2.7.9

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.