Jupyter内核死于nbconvert,但不是死在jupyter上

时间:2018-07-30 07:18:43

标签: python jupyter-notebook

我创建了一个简单的内核,用于包装单元格的内容,并在jupyter上的特定数据库中将其作为SQL执行。

当我在安装了jupyter笔记本并执行任务的jupyter笔记本上打开内核时,内核完全可以正常工作。

但是当我尝试使用nbconvert执行笔记本时,它会引发以下有关内核在响应之前死亡的错误。

Exception in thread Thread-31:
Traceback (most recent call last):
  File "/opt/anaconda/4.2.0/envs/py36/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/opt/anaconda/4.2.0/envs/py36/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "<ipython-input-5-d1a08220a4cf>", line 87, in threadedOperation
    ep.preprocess(nb, {'metadata': {'path': ''}})
  File "/opt/anaconda/4.2.0/envs/py36/lib/python3.6/site-packages/nbconvert/preprocessors/execute.py", line 257, in preprocess
    cwd=path)
  File "/opt/anaconda/4.2.0/envs/py36/lib/python3.6/site-packages/nbconvert/preprocessors/execute.py", line 241, in start_new_kernel
    kc.wait_for_ready(timeout=startup_timeout)
  File "/opt/anaconda/4.2.0/envs/py36/lib/python3.6/site-packages/jupyter_client/blocking/client.py", line 120, in wait_for_ready
    raise RuntimeError('Kernel died before replying to kernel_info')
RuntimeError: Kernel died before replying to kernel_info

关于什么可能导致这种情况或我可以从哪里开始寻找答案的任何想法?

1 个答案:

答案 0 :(得分:1)

找到了解决方法

python3 -m ipykernel install --user

https://github.com/udacity/aind2-dl/issues/9