cmd打开anaconda的python3.7.3出现奇怪错误求大神
python3吧
全部回复
仅看楼主
level 3
2019年05月10日 06点05分 1
level 3
Failed calling sys.__interactivehook__
Traceback (most recent call last):
File "H:\anaconda3\lib\site.py", line 439, in register_readline
readline.read_history_file(history)
File "H:\anaconda3\lib\site-packages\pyreadline\rlmain.py", line 165, in read_history_file
self.mode._history.read_history_file(filename)
File "H:\anaconda3\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 0x90 in position 683: illegal multibyte sequence
2019年05月10日 06点05分 2
level 3
已经尝试重装anaconda但是没用
卸载pyreadline模块但是报错
(base) X:\Users\wangc>pip uninstall pyreadline
Cannot uninstall 'pyreadline'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
2019年05月10日 06点05分 3
level 1
请问你找到这个问题的解决方法了吗,我也碰到了。
2019年05月18日 13点05分 4
一模一样
2019年10月30日 06点10分
level 1
楼上正解
2019年07月19日 08点07分 7
level 1
你好:
可以 进入到该目录:Anaconda3\Lib\site-packages\pyreadline\lineeditor ,
history.py文件的第82行,修改如下:
for line in open(filename, 'r',encoding='utf-8'):
在原有的open函数里 新增了一个参数选项encoding='utf-8'
就可以解决了
2019年08月09日 08点08分 8
感激不尽!
2019年08月11日 13点08分
完美,这是anaconda的bug
2019年08月21日 09点08分
感谢!
2019年08月23日 03点08分
@風風歐巴 不用谢,相互学习
2019年08月26日 06点08分
level 1
感谢大神![真棒]
2019年09月04日 09点09分 9
level 1
感谢大咖![大拇指]
2020年01月06日 15点01分 11
level 1
pyhton启动运行时会读.python_history文件,而这个文件中包含了中文,就会导致错误。因此只要删除这个历史文件就好了。这个文件通常在c:\user\username\下。
详见:https://blog.csdn.net/fjnuzs/article/details/99850229
2020年01月16日 08点01分 12
试你这个[哈哈]解决了,但是8楼那位说的并不行,搞不清为啥
2020年03月29日 18点03分
非常感谢
2021年03月07日 06点03分
level 10
文件编码应该设为UTF-8
2020年06月09日 14点06分 13
level 1
编码错误
2020年06月29日 20点06分 14
level 1
Error processing line 7 of D:\Anaconda3\lib\site-packages\pywin32.pth:
Traceback (most recent call last):
File "D:\Anaconda3\lib\site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pywin32_bootstrap'
Remainder of file ignored
这个应该怎么解决呀?求大神指点
2020年09月24日 07点09分 16
请问这个问题你解决了吗?我遇到了一样的问题[泪]
2022年08月13日 20点08分
1