Default python2.6 switch to Python27

Source: Internet
Author: User

# Install Modify Python
Yum-y Install python27 Python27-devel

Python-v; Python2.6-v # View current Python version both of these should be original 2.6.x
ls-hli/usr/bin/python*; Cp-f/usr/bin/python2.6/usr/bin/python2.6.bak; Rm-f/usr/bin/python/usr/bin/python; Cp/usr/bin/python2.7/usr/bin/python; ls-hli/usr/bin/python*
Python-v; PYTHON2.6-V # Verify that the Python version is ok (python->2.7, python2.6->python2.6.x)


Yum-h # Verify Yum is unavailable, command error exits
Head-n 2/usr/bin/yum; Sed-i ' s/python$/&2\.6/'/usr/bin/yum; Head-n 2/usr/bin/yum # Replace Python in/usr/bin/yum with python2.6
Yum-h # Verify Yum is available, no more errors exit at this time

Default python2.6 switch to Python27

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.