当我启动spyder时,会弹出内部控制台并提供以下“追溯”:
>>> WARNING:traitlets:kernel died: 6.001837253570557
Traceback (most recent call last):
File "C:\...\lib\site-packages\traitlets\traitlets.py", line 528, in get
value = obj._trait_values[self.name]
KeyError: 'banner'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\...\lib\site-packages\qtconsole\base_frontend_mixin.py", line 163, in _dispatch
handler(msg)
File "C:\...\lib\site-packages\qtconsole\jupyter_widget.py", line 296, in _handle_kernel_info_reply
super(JupyterWidget, self)._started_channels()
File "C:\...\lib\site-packages\qtconsole\frontend_widget.py", line 617, in _started_channels
self.reset(clear=True)
File "C:\...\lib\site-packages\qtconsole\frontend_widget.py", line 661, in reset
self._append_plain_text(self.banner)
File "C:\...\lib\site-packages\traitlets\traitlets.py", line 556, in __get__
return self.get(obj, cls)
File "C:\...\lib\site-packages\traitlets\traitlets.py", line 535, in get
value = self._validate(obj, dynamic_default())
File "C:\...\lib\site-packages\spyder\widgets\ipythonconsole\shell.py", line 280, in _banner_default
return self.long_banner()
File "C:\...\lib\site-packages\spyder\widgets\ipythonconsole\shell.py", line 91, in long_banner
from IPython.core.usage import quick_guide
ImportError: cannot import name 'quick_guide'
IPython控制台没有问题,只是缺少“介绍文本”(python版本,帮助命令)。
我可以忽略此异常,还是有办法手动修复此问题?
答案 0 :(得分:3)
要手动修复异常,需要更改回溯中最后提到的文件。在这种情况下,这一个:
File "C:\...\lib\site-packages\spyder\widgets\ipythonconsole\shell.py", line 91, in long_banner
from IPython.core.usage import quick_guide
ImportError: cannot import name 'quick_guide'
并将quick_guide
更改为quick_reference as quick_guide
。可能需要重启Spyder但是Exception消失了。
答案 1 :(得分:3)
( Spyder开发人员)这是在Spyder 3.1.4 (刚刚发布)中修复的。请更新以修复它。
答案 2 :(得分:-1)
我解决了:
仅在您的 conda 环境中使用 conda install spyder=3.1.4
。
问候。