用cmd启动python提示编码错误
C:\Users\chin>python
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Failed calling sys.__interactivehook__
Traceback (most recent call last):
File "E:\anaconda\lib\site.py", line 410, in register_readline
readline.read_history_file(history)
File "E:\anaconda\lib\site-packages\pyreadline\rlmain.py", line 165, in read_history_file
self.mode._history.read_history_file(filename)
File "E:\anaconda\lib\site-packages\pyreadline\lineeditor\history.py", line 82, in read_history_file
for line in open(filename, 'r'):
UnicodeDecodeError: 'gbk' codec can't decode byte 0x89 in position 1079: illegal multibyte sequence
>>>
在v2ex上看到类似的问题,但是重装python解决的。但不想这样做,同样的问题还会无法解决。
多个文件出现问题,是site.py rlmain.py还是history.py呢,抑或是全部有问题呢