Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ipython up and down arrow strange behaviour

In my installation of ipython I have this strange problem where I cannot reliably move through command history with up and down arrows... a lot of the time it just doesn't work (nothing happens on the key press). Also sometimes writing normal characters at the end of the command just doesn't work.

My system: Mac OSX Lion

I have readline installed...

thank you for the help! david

like image 536
davidhq Avatar asked Oct 22 '12 15:10

davidhq


2 Answers

Make sure you installed readline before ipython.

sudo pip uninstall ipython

sudo pip install readline ipython

(I know this question is a few months old, but for future reference)

like image 79
davoclavo Avatar answered Nov 09 '22 05:11

davoclavo


I had to install readline with easy_install readline and that fixed it. Using pip install readline did not work for me, and ipython gave a warning:

******************************************************************************
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).
******************************************************************************
like image 28
caiman Avatar answered Nov 09 '22 05:11

caiman