前面我们介绍过,在命令行或终端下,可以使用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环境下,我们双击快捷方式的图标后,会弹出下面的命令行界面,显示了服务器的信息:
启动服务器后,会在你的默认浏览器中打开对应的url,并显示默认界面如下图所示:
当前显示的目录是你的notebook服务器所在的工作目录,这个是可以配置的。
重要提示:由于本工具的使用在Windows下具有代表性,以后的内容介绍都使用Windows环境。
下面介绍几个命令行运行方式下的小技巧:
jupyter notebook notebook.ipynb
jupyter notebook --port 9999
jupyter notebook --no-browser
jupyter notebook --help