启动

阅读: 9942     评论:0

前面我们介绍过,在命令行或终端下,可以使用jupyter notebook命令,启动程序。这时会打印一些服务器的信息,默认的web应用url地址为http://localhost:8888。下面是Linux或mac中的信息节选:

$ jupyter notebook
[I 08:58:24.417 NotebookApp] Serving notebooks from local directory: /Users/catherine
[I 08:58:24.417 NotebookApp] 0 active kernels
[I 08:58:24.417 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 08:58:24.417 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

而在Windows环境下,我们双击快捷方式的图标后,会弹出下面的命令行界面,显示了服务器的信息:

img

启动服务器后,会在你的默认浏览器中打开对应的url,并显示默认界面如下图所示:

img

当前显示的目录是你的notebook服务器所在的工作目录,这个是可以配置的。

重要提示:由于本工具的使用在Windows下具有代表性,以后的内容介绍都使用Windows环境。

下面介绍几个命令行运行方式下的小技巧:

  1. 打开指定的notebook文件: jupyter notebook notebook.ipynb
  2. 指定运行的端口:jupyter notebook --port 9999
  3. 启动服务器但不打开浏览器:jupyter notebook --no-browser
  4. 查看服务器帮助内容:jupyter notebook --help

 安装和文档 运行机制 

评论总数: 0


点击登录后方可评论