IPython OS X: Up arrow gives "^[[A"

ipython, macos

Solution

It sounds like you're using an old version of the Python readline module, I had somewhat similar problem to this

Aha! I had an old version of the Python readline module - installing the latest from http://ipython.scipy.org/dist/ and it works perfectly!

sudo easy_install http://ipython.scipy.org/dist/readline-2.5.1-py2.5-macosx-10.5-i386.egg

Problem

Whenever I hit the up arrow in IPython, instead of getting history, I get this set of characters "^[[A" (not including the quotes). Hitting the down arrow gives "^[[B", and tab completion doesn't work (just enters a tab). How can I fix this? It happens in both Terminal and iTerm. Running OS X 10.5, Framework Python 2.5.4. Error occurs in both ipython 0.8.3 and ipython 0.9.1. pyreadline-2.5.1 egg is installed in both cases. (edit: SSH-ing to another linux machine and using IPython there works fine. So does running the normal "python" command on the OS X machine.) Cheers, - Dan

Original source

Related problems