ipython上下箭头奇怪的行为

dav*_*dhq 6 python macos ipython

在我的ipython安装中,我遇到了这个奇怪的问题,我无法通过向上和向下箭头可靠地移动命令历史......很多时候它只是不起作用(按键上没有任何反应).有时在命令末尾写正常字符也行不通.

我的系统:Mac OSX Lion

我有readline安装...

感谢您的帮助!大卫

dav*_*avo 7

确保 ipython 之前安装了readline .

sudo pip uninstall ipython

sudo pip install readline ipython

(我知道这个问题已经有几个月了,但供将来参考)


cai*_*man 5

我不得不安装readline easy_install readline并修复它.使用pip install readline对我不起作用,ipython发出警告:

******************************************************************************
libedit detected - readline will not be well behaved, including but not limited to:
   * crashes on tab completion
   * incorrect history navigation
   * corrupting long-lines
   * failure to wrap or indent lines properly
It is highly recommended that you install readline, which is easy_installable:
     easy_install readline
Note that `pip install readline` generally DOES NOT WORK, because
it installs to site-packages, which come *after* lib-dynload in sys.path,
where readline is located.  It must be `easy_install readline`, or to a custom
location on your PYTHONPATH (even --user comes after lib-dyload).
******************************************************************************
Run Code Online (Sandbox Code Playgroud)