Python: version upgrade, python version upgrade

Source: Internet
Author: User

Python: version upgrade, python version upgrade

The python version installed on Linux is 2.6.6, which does not meet the requirements of running the software. Therefore, python is upgraded.
To learn more about MySQL Fabric, you must use Python 2.7. Therefore, you can only upgrade the existing version.

 

Download, decompress, compile, and install all these operations. It is said that the old version of python that comes with the system is heavily dependent, So You Cannot uninstall the original Python. Here, select a new installation.

 

Wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tar.xz

Tar-xvf Python-2.7.12.tar.xz
Cd Python-2.7.12
./Configure -- prefix =/usr/local/python2.7
Make
Make install


After installation, run Python to check if it is normal.
/Usr/local/python2.7/bin/python2.7-V


Next, you need to create a link to change python to python2.7 by default.
Ln-fs/usr/local/python2.7/bin/python2.7/usr/bin/python


Run python to view the version
Python-V


After the modification, yum cannot run. Modify the/usr/bin/yum file
#! /Usr/bin/python
In python to the original python version of the system, my is as follows:
#! /Usr/bin/python2.6.6

This completes.

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.