At first, I had this requirement because I had always compiled an error when I used YaH3C to replace iNode for campus network authentication. I was prompted that I could not find a Python module. Baidu had a try, this module is available only in Python2.7 and later versions, but the Python version 2.6 is included in the system. it is no wonder that this module has never been connected to the Internet. So I continued to install Baidu and google, and then encountered a problem... I will record it at the beginning here, so I can forget it. Check the python version # python-VPython has this requirement at the beginning, because the system keeps compiling errors when replacing iNode with YaH3C for campus network authentication, and prompts that a Python module cannot be found. baidu has gone through it, this module is available only in Python2.7 and later versions, but the Python version 2.6 is included in the system. it is no wonder that this module has never been connected to the Internet. So I continued to install Baidu and google, and then encountered a problem... I will record it at the beginning here, so I can forget it.
View python version
# Python-V
Python 2.6.6
1. download the Python-2.7.3
# Wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
2. extract
# Tar-jxvf Python-2.7.3.tar.bz2
3. change the working directory
# Cd Python-2.7.3
4. Installation
#./Configure
# Make all
# Make install
# Make clean
# Make distclean
5. View version information
#/Usr/local/bin/python2.7-V
6. establish a soft connection to point python to python2.7 by default.
# Mv/usr/bin/python/usr/bin/python2.6.6
# Ln-s/usr/local/bin/python2.7/usr/bin/python
7. verify the Python version again.
# Python-V
8 solve the problem that the system Python soft link points to Python 2.7, because yum is incompatible with Python, so yum cannot work normally, we need to specify the Python version of yum
# Vi/usr/bin/yum
Place
#! /Usr/bin/python
Change
#! /Usr/bin/python2.6.6
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