I am using macOS Mojave and Iterm2: 3.2.7beta4. This is an issue I am seeing with python3 interpreter. When I type the arrow keys to move the cursor or to run the last command, I see

^[[A, (with up key) ^[[B (with down)

instead on the terminal. Its not the case with python2. I have checked the key bindings on iterm and nothing seems to be causing this. Does anyone have an idea about this?

1 Answer 1


Looks like you could be missing readline. Pip install readline Or if you have brew brew install readline Source: https://stackoverflow.com/a/40229934/1684474

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .