centos7 Python3終端中敲擊方向鍵顯示「^[[C^[[D」
阿新 • • 發佈:2019-02-18
copy sta blog invalid oca ins 編譯 方向鍵 重新編譯
[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
centos7 Python3終端中敲擊方向鍵顯示「^[[C^[[D」