python2.6 Upgrade to 2.7

Source: Internet
Author: User

Development department needs to use python2.7, because the public network environment Python version is the system comes with, the version is 2.6, need to upgrade, preferably through the RPM upgrade.

Linux systems: CentOS

CentOS 6.4 Upgrade Python after Yum unavailable solution http://www.linuxidc.com/Linux/2013-05/84727.htm

Implementation steps:

1. Download the release file for Nux

wget http://li.nux.ro/download/nux/dextop/el6/i386/nux-dextop-release-0-2.el6.nux.noarch.rpm

RPM-IVH nux-dextop-release-0-2.el6.nux.noarch.rpm

Yum-y Install Python27

Yum-y Install Python27-devel

2, upgrade Python

CentOS uses python2.6.* by default and requires python2.7 files to overwrite python files.

cd/usr/bin/

RM-RF python

CP python2.7 Python

3, test

Enter the Python--version on the command line, if the output shows the result is correct:

[email protected] script]# python--version

Python 2.7.3

4, since Yum does not have compatible python2.7, the following red parts need to be modified from #!/usr/bin/python to #!/usr/bin/python2.6.

Vi/usr/bin/yum, put the red part below.

#!/usr/bin/python

Modified to:

#!/usr/bin/python2.6

5. Configure IBUs

Use VI to open the following two files, find the exec Python line, the exec python changed to exec python2.6 save, exit. The IBUs is back to normal after a reboot! Are you happy?

    1. #vi/usr/bin/ibus-setup
    1. #vi/USR/LIBEXEC/IBUS-UI-GTK

python2.6 Upgrade to 2.7

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.