Jupyter Notebook打开后显示kernel dead(Kernel error)


报错信息如下:

Traceback (most recent call last):
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\web.py", line 1512, in _execute
result = yield result
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\ProgramData\Anaconda2\lib\site-packages\notebook\services\sessions\handlers.py", line 73, in post
type=mtype))
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\ProgramData\Anaconda2\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\ProgramData\Anaconda2\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "C:\ProgramData\Anaconda2\lib\site-packages\tornado\gen.py", line 307, in wrapper
yielded = next(result)
File "C:\ProgramData\Anaconda2\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 148, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\ProgramData\Anaconda2\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\ProgramData\Anaconda2\lib\site-packages\jupyter_client\manager.py", line 258, in start_kernel
**kw)
File "C:\ProgramData\Anaconda2\lib\site-packages\jupyter_client\manager.py", line 203, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\ProgramData\Anaconda2\lib\site-packages\jupyter_client\launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\ProgramData\Anaconda2\lib\subprocess.py", line 390, in init
errread, errwrite)
File "C:\ProgramData\Anaconda2\lib\subprocess.py", line 640, in _execute_child
startupinfo)

 

jupyter notebook没有读到正确的python 内核路径.有几种可能性,比如你反复下载了anaconda导致路径变更,或者是你修改了你的anaconda文件夹的名字,导致和jupyter notebook原本json设置的python 内核读取路径不对。

解决方法如下:

(1)在Anaconda Prompt中输入语句(对windows而言,linux或Max直接在终端输入查看)

jupyter kernelspec list

查看安装的内核及其位置 

(2)进入内核所在的目录,打开里面的kernel.jason文件,查看Python编译器的路径是否正确

如果不对则修改为正确的的python编译器路径。

通常为anaconda安装目录下的python.exe

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值