Centos 6.4 Python 2.6 upgrade to 3.5.2

Source: Internet
Author: User

View the version of Python

#python  -V    2.6.  6  

1. Download Python-2.5.2

#wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz

2. Unzip

TAR-ZXVF python-3.5. 2

3. Change the working directory

# CD python-3.5. 2

4. Installation

#./Configure  #make all             #make install  #make   Clean

5. View version Information

#/usr/local/bin/python3. 5 -V  

6. Establish a soft connection so that the system default Python points to Python3

#mv/usr/bin/python3/usr/bin/python2. 6.6  

7. Re-examine the Python version

#python-V  

8 Resolve system Python soft link to Python3.5 version, since Yum is not compatible with Python 3.5, Yum does not work properly and we need to specify the Python version of Yum

#vi/usr/bin/Yum changes the  file header's #!/usr/bin/python to #!/usr/bin/python2.  6.6

9. 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!

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

Refer to:

http://blog.csdn.net/jcjc918/article/details/11022345

Centos 6.4 Python 2.6 upgrade to 3.5.2

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.