gpt4 book ai didi

python - Jupyter 内核死于 nbconvert 但不是在 jupyter

转载 作者:行者123 更新时间:2023-12-03 14:49:31 25 4
gpt4 key购买 nike

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

当我在安装它的 jupyter notebook 上打开内核时,内核完全按预期工作,并且执行得很好。

但是当我尝试使用 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

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

最佳答案

找到了解决方案

python3 -m ipykernel install --user

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

关于python - Jupyter 内核死于 nbconvert 但不是在 jupyter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51588840/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com