解决linux中,Python版本升级后,交互模式下方向键、退格键等出现乱码的问题

xiaoxiao2021-02-28  46

[root@localhost ~]# python3 Python 3.6.4 (default, Jan 29 2018, 22:45:20) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux Type “help”, “copyright”, “credits” or “license” for more information.

fdsfs^H^H^H^H^H

由于系统缺少了readline相关模块,没有安装readline-devel模块,所以只要安装下即可。 [root@localhost ~]# yum list | grep readline readline.x86_64 6.2-10.el7 @anaconda readline.i686 6.2-10.el7 base readline-devel.i686 6.2-10.el7 base readline-devel.x86_64 6.2-10.el7 base readline-static.i686 6.2-10.el7 base readline-static.x86_64 6.2-10.el7 base [root@localhost ~]# yum -y install readline-devel.x86_64 安装完成readline-devel后,再重新编译安装Python3.6即可解决问题。 http://blog.csdn.net/nkd50000/article/details/79200966

转载请注明原文地址: https://www.6miu.com/read-2150384.html

最新回复(0)