Arrow keys no longer work in Python shell after upgrading Mac OS to Sierra Arrow keys no longer work in Python shell after upgrading Mac OS to Sierra python python

Arrow keys no longer work in Python shell after upgrading Mac OS to Sierra


I solved it by installing python from homebrew:

brew unlink pythonbrew install python


I had the exact same issue and this command worked for me easy_install -a readline.

Full credit here: ipython complaining about readline


This worked for me:

CFLAGS="-I$(brew --prefix readline)/include -I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" \LDFLAGS="-L$(brew --prefix readline)/lib -L$(brew --prefix openssl)/lib" \PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs2 \pyenv install -v 2.7.11

Source: https://medium.com/@pimterry/setting-up-pyenv-on-os-x-with-homebrew-56c7541fd331#.urbdkrc9l