CentOS Installation Python3

Source: Internet
Author: User

Currently learning Python3 has become the mainstream, for the installation of Python3, here to do a simple summary, in the installation process there are some small pits, shared out for your reference.
I use the system is: CentOS 7.2.1511, minimized installation method, install Python3.5 version.

Download and install Python3

1. Install the necessary compilation environment and installation tools on the system first:

Yum Install wget gcc gcc+

2, download the official python3.5.3 source package

wget https://www.python.org/ftp/python/3.5.3/Python-3.5.3.tgz

3, unzip the source package, and install

Tar xvf python-3.5.3.tgz cd python-3.5.3./configure makemake install

4, after the installation is complete, the execution python3 command to view the current Python version

[[email protected] ~]# Python3python 3.5.3 (default, APR 4, 16:32:58) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on Lin Uxtype "Help", "copyright", "credits" or "license" for more information.>>>
Resolve Python3 cannot use fallback key

After Python3 is installed, if you want to use the Python3 console interface, you cannot use the fallback and arrow keys to move the cursor by default. When using the arrow keys and fallback keys to control the cursor, the following occurs:

>>> exit () ^h^h^h^h^[[c^[[d

If you only need to use the fallback key, you can first press the CTRL key, and then press the fallback key to delete, but to use the left and RIGHT arrow keys to move the cursor will appear garbled. The reason for this problem is that in the Python shell, these key instructions are not translated into specific operations, and the key function instructions are readline.

To solve this problem we need to install the corresponding ReadLine tool.

Yum Install Readline-devel-y

Then, recompile the installation as you did before:).


This article is from the "Trying" blog, make sure to keep this source http://tryingstuff.blog.51cto.com/4603492/1912879

CentOS Installation Python3

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.