C:\Users\data>python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Failed calling sys.__interactivehook__
Traceback (most recent call last):
File "C:\Python\Python37\lib\site.py", line 439, in register_readline
readline.read_history_file(history)
File "C:\Python\Python37\lib\site-packages\pyreadline\rlmain.py", line 165, in read_history_file
self.mode._history.read_history_file(filename)
File "C:\Python\Python37\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 0x80 in position 247: illegal multibyte sequence
>>>

 

解决方案:

方法1:卸载pyreadline模块(我用的第二种)

方法2:把site-packages目录下的pyreadline目录删除(解决了)

 

原因:BUG,但是具体是什么样子的BUG还在找。

 

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐