在终端启动Python时报错的解决
最近,在终端启动Python时,报了一个错误:
1 Failed calling sys.__interactivehook__ 2 Traceback (most recent call last): 3 File "d:ProgramDataAnaconda3libsite.py", line 439, in register_readline 4 readline.read_history_file(history) 5 File "d:ProgramDataAnaconda3libsite-packagespyreadlinelmain.py", line 165, in read_history_file 6 self.mode._history.read_history_file(filename) 7 File "d:ProgramDataAnaconda3libsite-packagespyreadlinelineeditorhistory.py", line 82, in read_history_file 8 for line in open(filename, "r"): 9 UnicodeDecodeError: "gbk" codec can"t decode byte 0xa7 in position 2167: illegal multibyte sequence