当前位置:   article > 正文

Jupyter Notebook:简介

jupyter you are requesting a page that does not exist

The Jupyter Notebook is an open source web application that you can use to create and share documents that contain live code, equations, visualizations, and text. Jupyter Notebook is maintained by the people at Project Jupyter.

Jupyter Notebook是一个开源Web应用程序,可用于创建和共享包含实时代码,方程式,可视化效果和文本的文档。 Jupyter Notebook由Jupyter项目的人员维护

Jupyter Notebooks are a spin-off project from the IPython project, which used to have an IPython Notebook project itself. The name, Jupyter, comes from the core supported programming languages that it supports: Julia, Python, and R. Jupyter ships with the IPython kernel, which allows you to write your programs in Python, but there are currently over 100 other kernels that you can also use.

Jupyter Notebook是IPython项目的一个衍生项目,该项目以前曾经拥有IPython Notebook项目。 Jupyter的名称来自它支持的核心支持的编程语言:Julia,Python和R。Jupyter随IPython内核一起提供,它允许您使用Python编写程序,但是目前有100多个其他内核也可以使用。

Free Bonus: 5 Thoughts On Python Mastery, a free course for Python developers that shows you the roadmap and the mindset you’ll need to take your Python skills to the next level.

免费奖金: 关于Python精通的5个想法 ,这是针对Python开发人员的免费课程,向您展示了将Python技能提升到新水平所需的路线图和心态。

使用Jupyter Notebook启动和运行 (Getting Up and Running With Jupyter Notebook)

The Jupyter Notebook is not included with Python, so if you want to try it out, you will need to install Jupyter.

Jupyter Notebook不包含在Python中,因此,如果要尝试使用它,则需要安装Jupyter。

There are many distributions of the Python language. This article will focus on just two of them for the purposes of installing Jupyter Notebook. The most popular is CPython, which is the reference version of Python that you can get from their website. It is also assumed that you are using Python 3.

Python语言有很多发行版。 为了安装Jupyter Notebook,本文仅关注其中两个。 最受欢迎的是CPython,这是您可以从其网站上获得的Python参考版本。 还假定您正在使用Python 3

安装 (Installation)

If so, then you can use a handy tool that comes with Python called pip to install Jupyter Notebook like this:

如果是这样,则可以使用Python附带的便捷工具pip来安装Jupyter Notebook,如下所示:

  1. $ pip install jupyter
  2. $ pip install jupyter

The next most popular distribution of Python is Anaconda. Anaconda has its own installer tool called conda that you could use for installing a third-party package. However, Anaconda comes with many scientific libraries preinstalled, including the Jupyter Notebook, so you don’t actually need to do anything other than install Anaconda itself.

下一个最受欢迎的Python发行版是Anaconda 。 Anaconda具有自己的名为conda的安装程序工具,可用于安装第三方程序包。 但是,Anaconda预先安装了许多科学库,包括Jupyter Notebook,因此除了安装Anaconda本身以外,您实际上不需要执行任何其他操作。

启动Jupyter Notebook服务器 (Starting the Jupyter Notebook Server)

Now that you have Jupyter installed, let’s learn how to use it. To get started, all you need to do is open up your terminal application and go to a folder of your choice. I recommend using something like your Documents folder to start out with and create a subfolder there called Notebooks or something else that is easy to remember.

现在您已经安装了Jupyter,让我们学习如何使用它。 首先,您需要做的就是打开终端应用程序,然后转到您选择的文件夹。 我建议使用“文档”文件夹之类的东西开始并在其中创建一个名为“笔记本”的子文件夹或其他易于记忆的东西。

Then just go to that location in your terminal and run the following command:

然后只需转到终端中的该位置并运行以下命令:

This will start up Jupyter and your default browser should start (or open a new tab) to the following URL: http://localhost:8888/tree

这将启动Jupyter,您的默认浏览器应启动(或打开一个新选项卡)以下URL: http:// localhost:8888 / tree

Your browser should now look something like this:

您的浏览器现在应如下所示:

Jupyter Notebook Server

Note that right now you are not actually running a Notebook, but instead you are just running the Notebook server. Let’s actually create a Notebook now!

请注意,现在您实际上并没有在运行Notebook,而是仅在运行Notebook服务器。 现在让我们实际创建一个Notebook!

创建笔记本 (Creating a Notebook)

Now that you know how to start a Notebook server, you should probably learn how to create an actually Notebook document.

既然您知道如何启动Notebook服务器,那么您可能应该学习如何创建实际的Notebook文档。

All you need to do is click on the New button (upper right), and it will open up a list of choices. On my machine, I happen to have Python 2 and Python 3 installed, so I can create a Notebook that uses either of these. For simplicity’s sake, let’s choose Python 3.

您需要做的就是单击“新建”按钮(右上角),它将打开一个选择列表。 在我的机器上,我碰巧安装了Python 2和Python 3,因此我可以创建一个使用这两个笔记本的笔记本。 为了简单起见,让我们选择Python 3。

Your web page should now look like this:

您的网页现在应如下所示:

New Jupyter Notebook

命名 (Naming)

You will notice that at the top of the page is the word Untitled. This is the title for the page and the name of your

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/197753
推荐阅读
相关标签
  

闽ICP备14008679号