Install the python3.5.1 on the CentOS

Source: Internet
Author: User
Tags install openssl

Turn from: http://www.linuxidc.com/Linux/2016-04/129784.htm

Key points:

1. Installation may need to rely on: Yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel

2. Download python3.5.1 's tar packets from the Python official web: wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz

3. Extract the tar packets into the/usr/local directory: TAR-ZXVF python-3.5.1.tgz/usr/local/

4. Install the python3.5.1 source package: Execute the command in the/usr/local/python3.5.1 directory (you need to ensure that the GCC command is installed, and if the GCC command is not installed, you can perform yum install gcc to install the GCC command):./ Configure--->make---->make Install

5. Replace the original python2.7 soft connection, when you enter Python at the command line, the default boot python3.5.1:

Rm-rf/usr/bin/python

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

6. Enter Python at the command line to see if it started python3.5.1

Related Article

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.