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

后端 未结 7 1015
甜味超标
甜味超标 2020-12-29 21:42

I\'m using zsh, iTerm2 (3.0.9), and pyenv (1.0.2) with pyenv global set to 3.5.2.

In the Python shell, the up and down arrow keys used to work, to access the previou

7条回答
  •  独厮守ぢ
    2020-12-29 22:05

    This can happen with upgrading XCode or XCode tools (which often occurs with an OS upgrade) when using brew installed python.

    In this case, you just need to reinstall:

    brew reinstall python
    

    If you need python 2, remember brew defaults to python3 now, so you need:

    brew reinstall python2
    

提交回复
热议问题