centos7 Python3终端中敲击方向键显示「^[[C^[[D」

 

[root@localhost src]# python3
Python 3.7.2 (default, Feb 16 2019, 21:52:05) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> dede^[[D^[[D^[[D^[[C^[[C^[[C^[[C^[[C^[[C^[[C
  File "<stdin>", line 1
    dede
        ^
SyntaxError: invalid syntax
>>> ^[[C
  File "<stdin>", line 1
    
    ^
SyntaxError: invalid syntax
>>> 
>>> 
>>> sudov^H^H^H^H^H^H^H^H^H^H^H
  File "<stdin>", line 1
         ^
SyntaxError: invalid syntax
>>> 
>>> exit()

 

安装

yum -y install readline-devel 

然后重新编译安装python3:

https://www.cnblogs.com/sea-stream/p/10388318.html

 

参考:

https://blog.csdn.net/u012063703/article/details/50460107

https://www.cnblogs.com/xiaoguozi0218/articles/8304005.html

https://www.cnblogs.com/tssc/p/7762998.html

https://blog.csdn.net/qq_39996858/article/details/82887469

上一篇:ES6环境搭建及react-router学习


下一篇:HMS Core Insights第四期直播回顾 – 机器学习,推开AI应用的门