出现这个问题,可能是因为运行某指令出现错误,导致产生了一个历史文件。 只需要将c:\user\username\下的.python_history文件删除即可 user //用户 username //你的用户名,每个人不一样