【问题标题】:VSCode Jupyter cannot update kernels automaticallyVSCode Jupyter 无法自动更新内核
【发布时间】:2021-01-23 11:22:19
【问题描述】:

我正在通过remoteSSH 开发Ubuntu,并且我在名为nn 的虚拟环境中更新了python 内核,从3.7.93.8.5但是,我仍然发现旧内核仍然存在在 jupyter 内核列表中。我想知道如何从内核列表中删除旧内核名称。

我已将python 3.7.9python3.6.4 替换为python 3.8.5,但旧内核并没有消失,我想手动删除它们。

此外,我无法从内核列表中选择Python 3.8.5

【问题讨论】:

    标签: python visual-studio-code jupyter


    【解决方案1】:

    我遇到了同样的问题,以下内容可能会对遇到此问题的其他人有所帮助:

    1. 通过 Ctrl+Shift+P 并选择 Reload Window 重新加载 VS 代码窗口。

    2. 在侧边栏中的Extensions 下重新加载 Python 和 Jupyter 扩展。

    3. 退出并重新启动 VS Code。

    看来 VS Code 更新解释器列表不是那么快。

    【讨论】:

      【解决方案2】:

      您似乎已经解决了您的问题。但万一其他人遇到这个或类似的问题。 VS Code jupyter 支持在标准 jupyter 位置查找任何已安装的内核规范,您可以在此处看到这些目录: https://jupyter.readthedocs.io/en/latest/use/jupyter-directories.html#data-files

      VS Code 应该能够获取 Jupyter 可以获取的任何内容。因此,如果您碰巧在 python 环境中安装了 jupyter,那么您可以从命令行运行 jupyter kernelspec list 以查看系统上安装的所有内核规范的列表。

      【讨论】:

        【解决方案3】:

        好的,我想通了。目录中有内核寄存器文件

        .local/jupyter/kernels/pythonxxxx
        

        我手动删除python379python364 然后一切正常。

        【讨论】:

          猜你喜欢
          • 2022-11-02
          • 1970-01-01
          • 2019-05-20
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2020-12-21
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多