CentOS 7, upgrade Python to 3.x

Source: Internet
Author: User
Tags creative commons attribution

by Francis_hao APR 11,2017

Using the source installation method

First, download the latest version of Python to the official website https://www.python.org/downloads/source/. Current is 3.6.1

After decompression into the source folder, there is a Readme.rst file. Description and how this source package is used.

Normally, you can install by using the following command, [] indicating that the item is optional

./configure
Make
[Make Test]
sudo make install

You can also transfer parameters to the configuration script. View the parameters that can be passed by running the./configure–help. Here we take care of the installation directory section

Python is installed by default in the/usr/local/bin directory, and the current 2.x version of Python is installed in the/usr/bin/directory. So there is no conflict. Of course you can also specify the installation location.

After installation, you can use Python3, which already supports the functions of tab completion and BACKSPACE. The original Python does not change, and Yum has no effect.


This article was authored by Liu Yinghao and licensed under the Creative Commons Attribution-NonCommercial use-Share 3.0 Chinese mainland license agreement in the same way. Welcome reprint, please specify the source:
Reprinted from: http://www.cnblogs.com/yinghao1991/

CentOS 7, upgrade Python to 3.x

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.