Ipython and Python in interactive mode keyboard Direction key garbled solution method

Source: Internet
Author: User

The solution is as follows:

1. Installing the ReadLine module

The ReadLine library is a library of bash shells that contains many features, such as command line auto-completion.

Commands to install under Ubuntu:

sudo apt-get install Libreadline-dev

2. Re-install Python

In the Python installation directory, perform the following:

Make;sudo make Install


Now go ahead and try it. No, if still not, use Python's own ReadLine module


Switch to the modules directory under the Python installation source directory and edit the setup file

Uncomment the #readline readline.c-lreadline-ltermcap Line #

Re-install Python (perform 2 operations)


PS: Readline/readline.h may appear under Fedora: there is no problem with that file or directory (the company is ubuntu11.10, my own machine is loaded with FEDORA14, this problem has arisen)

Workaround:

sudo yum install libtermcap-devel ncurses-devel libevent-devel readline-devel


CentOS 6 under Ipython under normal conditions are colored,

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/5F/wKioL1T8HwrxpI0iAAGllCiTObg080.jpg "title=" 2.jpg " alt= "Wkiol1t8hwrxpi0iaagllcitobg080.jpg"/>

If the prompt does not have color after the installation is complete, please try yum install readline-devel.

This article is from the "Professor" blog, please be sure to keep this source http://professor.blog.51cto.com/996189/1618390

Ipython and Python in interactive mode keyboard Direction key garbled solution method

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.