Jupyter:无法创建新笔记本? [英] Jupyter: can't create new notebook?

查看:1968
本文介绍了Jupyter:无法创建新笔记本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些现有的Python代码,希望将其转换为Jupyter笔记本.我已经跑了:

I have some existing Python code that I want to convert to a Jupyter notebook. I have run:

jupyter notebook

现在我可以在浏览器中看到此内容:

Now I can see this in my browser:

但是如何创建一个新笔记本?菜单中的Notebook链接显示为灰色,我看不到其他任何用于创建新笔记本的选项.

But how do I create a new notebook? The Notebook link in the menu is greyed out, and I can't see any other options to create a new notebook.

在Jupyter运行时,我在命令行上注意到了这一点:

I've noticed this on the command line while Jupyter is running:

[W 22:30:08.128 NotebookApp] Native kernel (python2) is not available 

推荐答案

您似乎没有安装IPython内核(或其他任何内核!).

It looks like you don't have an IPython kernel installed (or any other kernel for that matter!).

有多种方法(旧版本新版本)来执行此操作.最简单的方法之一是使用pip.在命令行中输入:

There are various ways (old versions, new versions) to do this. One of the simplest ways is to use pip. From the command line enter:

pip install ipython

您可能还需要向Jupyter注册内核(请参见新版本页):

You may also need to register the kernel with Jupyter (see the new versions page):

python -m pip install ipykernel

python -m ipykernel install [--user] [--name <machine-readable-name>] [--display-name <"User Friendly Name">]

您现在应该可以从Jupyter启动Python笔记本.

You should now be able to launch a Python notebook from Jupyter.

或者,使用

Alternatively, installing Jupyter using any of the methods on this page should ensure that the IPython kernel is already there. Personally, Anaconda has always just worked out of the box for me (when I've used it on Linux and Mac OS).

这篇关于Jupyter:无法创建新笔记本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆