在不运行 Web 浏览器的情况下启动 IPython 笔记本服务器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31953518/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 10:47:36  来源:igfitidea点击:

Start IPython notebook server without running web browser?

pythonipythonjupyter-notebook

提问by Enrico Pirani

I would like to use Emacs as main editor for iPython notebooks / Jupyter Notebook (with the package ein). I want to ask you if there is a way to run the server without the need to open a web browser.

我想使用 Emacs 作为 iPython notebooks / Jupyter Notebook(带有ein包)的主编辑器。我想问你是否有一种无需打开网络浏览器即可运行服务器的方法。

采纳答案by Cyphase

Is this what you want?

这是你想要的吗?

$ ipython notebook --no-browser

Edit

编辑

Now you should use instead

现在你应该改用

$ jupyter notebook --no-browser

Since

自从

ipython notebookis deprecated and will be removed in future versions. You likely want to use jupyter notebookin the future

ipython notebook已弃用,将在未来版本中删除。你可能想jupyter notebook在未来使用

回答by Mithril

If you don't want to type ipython notebook --no-browserall the time,

如果你不想一直打字ipython notebook --no-browser

for ipython 4.0 with jupyter:

对于带有 jupyter 的 ipython 4.0:

  1. generate config

    jupyter notebook --generate-config
    

    it would create a file at some place like

    win: C:\Users\[YouUserName]\.jupyter\jupyter_notebook_config.py

    linux: ~/.jupyter/jupyter_notebook_config.py

  2. add c.NotebookApp.open_browser = Falseto this file.

  1. 生成配置

    jupyter notebook --generate-config
    

    它会在某个地方创建一个文件,比如

    赢: C:\Users\[YouUserName]\.jupyter\jupyter_notebook_config.py

    linux: ~/.jupyter/jupyter_notebook_config.py

  2. 添加c.NotebookApp.open_browser = False到此文件。

All done!

全部完成!