Failed calling sys.__interactivehook__
C:\Users\data>pythonPython 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.Failed calli...
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还在找。
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)