Install Python in CentOS

Source: Internet
Author: User

Install Python in CentOS

Install gcc before installing python

Yum install gcc

Find your desired pythonversion at https://www.python.org/ftp/python /.

Like https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgz

Download python

Wget https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgz

Decompress, compile, and install

# Tar zxvf Python-3.4.1.tgz


# Cd Python-3.4.1.tgz

#./Configure

# Make

# Make install

 


At this time, the new version of python does not overwrite the original version.

Vi/user/bin/yum

Change the first line of python to python2.7.

# Mv/usr/bin/python/usr/bin/python2.7

Recreate a hyperlink

# Ln-s "python download and compilation directory" (Space)/usr/bin/python

Open python again to display the new version

# Python

Python 3.4.1 (default, Aug 25 2014, 10:04:52)
Type "help", "copyright", "credits" or "license" for more information.
>>>

Installed successfully!

You may also like the following article about Python:

Installation of Python in Linux and precautions

Install and use the Python rq module in Ubuntu 14.04

Directly run Python code without the need for the operating system

Install Python3.4 on CentOS source code

Python core programming version 2. (Wesley J. Chun). [Chinese version of hd pdf]

Python development technology details. (Zhou Wei, Zong Jie). [hd PDF scan version + book guide video + code]

Obtain Linux information using a Python script

Build a desktop algorithm transaction research environment using Python in Ubuntu

A Brief History of Python Development

Python details: click here
Python: click here

This article permanently updates the link address:

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.