JupyterHub JupyterLab - ImportError: 无法从 'jupyter_client.manager' 导入 'AsyncKernelManager'

3

我一直在notebook模式下使用k8s运行JupyterHub,但现在想要切换到JupyterLab。当我首次启动JupyterLab时,会询问我是否要重新构建内核(但失败了),所以我选择不要重新构建。

接下来:

当我尝试启动python3内核时,在日志中(JS控制台和容器后端)我收到了如下信息:

ImportError: cannot import name 'AsyncKernelManager' from 'jupyter_client.manager'

如果我在 JupyterLab 中打开终端并执行以下操作:
python -c "from jupyter_client import AsyncKernelManager"

没有问题。

该怎么办呢?

PS:这里有一个开放的GitHub问题单,但没有太多信息https://github.com/jupyter/jupyter_client/issues/551

1个回答

2

在启动容器后,您是否更新了根conda环境中的任何内容?如果Python版本已更新(可能是由于从不同的库中读取),则会发生这种情况。


这是我的问题。关闭JupyterLab,重新在新的Bash中打开解决了它。 - Sebastiaan

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接