个人博客地址:Python3命令行交互不能使用方向键 | 一张假钞的真实世界
自定义安装Python3后在命令行使用方向键时出现以下问题:
$ python3
Python 3.7.4 (default, Dec 11 2019, 17:40:08)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> ^[[A^[[B^[[C^[[D
解决方法是安装readline:
pip3 install readline