无法在浏览器中启动Jupyter实验室或Jupyter笔记本电脑

时间:2019-06-02 11:48:17

标签: jupyter-notebook jupyter jupyter-lab

启动Jupyter实验室或Jupyter笔记本时,我得到以下日志-

[W 17:03:08.963 NotebookApp] No web browser found: could not locate runnable browser.

Jupyter不会启动浏览器(或浏览器中的选项卡)。

(我正在使用Linux-Manjaro i3社区版)

我已将Jupyter配置为使用

的google-chrome-stable
jupyter notebook --generate-config

并在~/.jupyter/jupyter_notebook_config.py

中设置以下行
c.NotebookApp.browser = '/usr/bin/google-chrome-stable' 

(是,我没有对以上行发表评论)

/usr/bin/google-chrome-stablegoogle-chrome-stable从终端成功启动chrome。

我也尝试过

jupyter lab --browser=google-chrome-stable
jupyter lab --browser google-chrome-stable

没有成功。

当我在系统上安装了Pale Moon时,Jupyter曾经在浏览器中打开过,但是现在我将其删除了,所以我似乎无法正常工作。 google-chrome-stable现在是我的默认浏览器。

一个明显的解决方法是将localhost URL复制到Web浏览器,但是我试图避免这种情况。

1 个答案:

答案 0 :(得分:0)

发布 dsjamieson 的回答 here

您必须为浏览器(在本例中为“google-chrome-stable”)提供一个字符串格式参数 (%s),以便将笔记本的 URL 传递给它:

jupyter lab --browser="google-chrome-stable %s"

或者,如果您更喜欢在应用模式下打开 chrome:

jupyter lab --browser="google-chrome-stable --app=%s"