CentOS Install Python 3.52__python

Source: Internet
Author: User

1, CentOS6.5 install Python's dependency pack

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 the Python3.5 source package and compile

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. You need to 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 needed to compile 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 L Ibpcap-devel xz-devel–remove-leaves

6, set alias to facilitate the use

Alias Py=python3

The following article about Python you may also like to see:

Linux under the installation of Python and considerations http://www.linuxidc.com/Linux/2015-11/124861.htm

Install using the Python RQ module in Ubuntu 14.04 http://www.linuxidc.com/Linux/2015-08/122441.htm

No need for operating system to run Python code directly http://www.linuxidc.com/Linux/2015-05/117357.htm

CentOS on the source code installation Python3.4 http://www.linuxidc.com/Linux/2015-01/111870.htm

The second edition of Python core programming. (Wesley J. Chun). [Chinese version of HD PDF] Http://www.linuxidc.com/Linux/2013-06/85425.htm

"Python Development Technology detailed". (Zhouwei, Zongjie). [HD PDF scan + with book video + code] http://www.linuxidc.com/Linux/2013-11/92693.htm

Python script gets Linux system Information http://www.linuxidc.com/Linux/2013-08/88531.htm

Using Python to build desktop algorithmic trading research environment under Ubuntu http://www.linuxidc.com/Linux/2013-11/92534.htm

The development history of Python language http://www.linuxidc.com/Linux/2014-09/107206.htm

Detailed description of Python: please click here
Python Download Address: Please click here

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.