为什么jupyter显示"没有找不到"?

时间:2016-07-22 03:53:26

标签: python kernel anaconda jupyter jupyter-notebook

我正在尝试使用jupyter来编写和编辑python代码。我打开了一个.ipynb文件,但是我看到了#34;没有找到"在右上角,我无法执行我编写的任何代码。奇怪的是,我打开其他.ipynb文件并没有问题。另外,当我点击红色"没有找不到"图标,我会收到消息"'无'内核不可用。请改为选择其他合适的内核,或者安装该内核。"我安装了Python 3.5.2。我怀疑问题是jupyter没有检测到Python 3内核?它显示" Python [root]"它应该说" Python 3。"有谁知道如何解决这个问题?

Screenshot of working code

Screenshot "None not found"

4 个答案:

答案 0 :(得分:32)

我在这里遇到了同样的问题。我的解决方案是:

    在内核菜单中的
  1. - >改变内核 - >选择Python [Root](或 你想要的内核,
  2. 保存文件,
  3. 关闭它,
  4. 重新打开它。

答案 1 :(得分:3)

我怀疑该特定.ipynb文件包含一些指定您尚未安装的内核的元数据 - 请参阅the file format specification

如果您使用文本编辑器打开该文件并搜索metadata,您应该会看到以下内容:

{
  "metadata" : {
    "signature": "hex-digest", # used for authenticating unsafe outputs on load
    "kernel_info": {
        # if kernel_info is defined, its name field is required.
        "name" : "the name of the kernel"
    },
    "language_info": {
        # if language_info is defined, its name field is required.
        "name" : "the programming language of the kernel",
        "version": "the version of the language",
        "codemirror_mode": "The name of the codemirror mode to use [optional]"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0,
  "cells" : [
      # list of cell dictionaries, see below
  ],
}

一种选择是将内核和语言条目更改为空字典,但您可能会发现此笔记本实际上是iR笔记本或其他任何笔记本。

答案 2 :(得分:1)

更改内核Python [Root] 保存,关闭并重新打开

答案 3 :(得分:0)

在新安装之前在新笔记本电脑上安装Anaconda后出现同样的问题。我安装了旧版本(3 4.0.0)并解决了问题。

相关问题