Centos upgrade to python3.3.2

Source: Internet
Author: User

1. Cenots6.3 is installed with 2.6.6 by default. to update and upgrade, you must install gcc:

Yum-y install gcc

The system automatically downloads and installs gcc.

2. Download python 3.3.2 http://python.org/getit/

3. Decompress python 3.3.2

Tar-jxvf Python-3.3.2.tar.bz2

4. Go to the directory: cd Python-3.3.2.tar.bz2

Install python

./Configure

Make all

Make install

Now we have installed python, but after entering the shell, check the python version: python-V and find that python is 2.6.6. We need to establish a link.

5. Establish a soft connection to allow the system to use the new version of python by default,

Mv/usr/bin/python/usr/bin/python2.6

Ln-s/usr/local/bin/python3.3/usr/bin/python

Verify whether python points to the following:

Python-V

After pointing the default python to 3.3.2, yum cannot be used normally. Edit the yum configuration file:

Vi/usr/bin/yum

#! /Usr/bin/python #! /Usr/bin/python2.6 save and exit.

For earlier centos versions, modify it #! /Usr/bin/python2.4


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.