在终端启动Python时报错的解决

在终端启动Python时报错的解决[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
hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » 在终端启动Python时报错的解决