Liunx system upgrade comes with a Python version

Source: Internet
Author: User

First, view system Information

cat /etc/redhat-6.4uname -R2.6. -358. el6.x86_64

Ii. viewing the version of Python that has been installed

[Email protected] ~]# rpm-qa|grepPythonpython-2.6.6- $. EL6.X86_64LIBXML2-python-2.7.6-8. El6_3.4. X86_64python-urlgrabber-3.9.1-8. El6.noarchpython-iwlib-0.1-1.2. El6.x86_64python-libs-2.6.6- $. el6.x86_64rpm-python-4.8.0- +. El6.x86_64dbus-python-0.83.0-6.1. El6.x86_64python-iniparse-0.3.1-2.1. El6.noarchpython-pycurl-7.19.0-8. El6.x86_64libproxy-python-0.3.0-3. El6_3.x86_64libreport-python-2.0.9- the. EL6.CENTOS.X86_64NEWT-python-0.52. One-3. El6.x86_64python-ethtool-0.6-3. EL6.X86_64ABRT-addon-python-2.0.8- the. El6.centos.x86_64[[email protected]~]# Python-Vpython2.6.6

Third, download compile and install python2.7.5 version source package

[Email protected] ~]# cd/usr/local/Src[[email protected]~]#wgetHttps//www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz[Email protected] ~]#TarXVF python-2.7.5. Tgz[[email protected]~]# CD python-2.7.5[[Email protected]~]# ./Configure[[email protected]~]# MakeAll[[email protected]~]# Make Install[[Email protected]~]# MakeClean[[email protected]~]# MakeDistclean

Iv. set the system default Python version to 2.7.5

rm /usr/bin/ln -s/usr/local/bin/python2. 7 /usr/bin/python

V. Check the updated Python version

[email protected] ~]# python-2.7. 5

(EXT) 54612982

Liunx system upgrade comes with a Python version

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.