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