Install Python 6.5 in CentOS 3.5

Source: Internet
Author: User

Install Python 6.5 in CentOS 3.5

1. CentOS6.5 install the Python dependency package

Yum groupinstall "Development tools"
Yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

2. Download and compile the Python source code package

Wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
Tar xf Python-3.5.0.tgz
Cd Python-3.5.0
./Configure -- prefix =/usr/local -- enable-shared
Make
Make install
Ln-s/usr/local/bin/python3/usr/bin/python3

3. Configure the library before running Python:

Echo/usr/local/lib>/etc/ld. so. conf. d/local. conf
Ldconfig

4. Run the demo:

Python3 -- version
Python 3.5.0

5. Delete the library required for compiling Python.

Yum groupremove "Development tools" -- remove-leaveas
Yum remove zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -- remove-leaves

6. Set aliases for ease of use

Alias py = python3

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.