[英]Launch Jupyter Notebook in Safari from Anaconda Navigator?
I would like to change the default browser for starting the Jupyter Notebook directly from Anaconda Navigator (the current browser is Chrome, but I want to open the notebook in Safari).我想更改默认浏览器以直接从 Anaconda Navigator 启动 Jupyter Notebook(当前浏览器是 Chrome,但我想在 Safari 中打开笔记本)。
I can start Jupyter Notebook in Safari by running the following code in Terminal: jupyter notebook --browser safari
(based on this answer).我可以通过在终端中运行以下代码在 Safari 中启动 Jupyter Notebook:
jupyter notebook --browser safari
(基于此答案)。
Is there a way to define a different browser for launching the notebook from the Navigator?有没有办法定义一个不同的浏览器来从导航器启动笔记本?
Right, so digging a bit deeper into the Anaconda documentation , I've found that it's pretty simple, actually.对,所以深入研究Anaconda 文档,我发现它实际上非常简单。 I found the config file at
~/.jupyter/jupyter_notebook_config.py
, uncommented the default line # c.NotebookApp.browser = ''
and modified it so that it points to the Safari's executable: c.NotebookApp.browser = u'open -a /Applications/Google\ Chrome.app %s'
.我在
~/.jupyter/jupyter_notebook_config.py
找到了配置文件,取消了默认行# c.NotebookApp.browser = ''
注释并对其进行了修改,使其指向 Safari 的可执行文件: c.NotebookApp.browser = u'open -a /Applications/Google\ Chrome.app %s'
。
upyter notebook --generate-config
upyter notebook --generate-config
C:\Users\username\.jupyter\jupyter_notebook_config.py
C:\Users\username\.jupyter\jupyter_notebook_config.py
C:\Users\username\.jupyter\
and browse to the file location and open it in IDLE editorC:\Users\username\.jupyter\
并浏览到文件位置并在 IDLE 编辑器中打开它#c.NotebookApp.browser = ''
#c.NotebookApp.browser = ''
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.