【问题标题】:Unable to start Jupyter lab or Jupyter notebook in a browser无法在浏览器中启动 Jupyter 实验室或 Jupyter 笔记本
【发布时间】:2019-06-02 11:48:17
【问题描述】:

我在启动 Jupyter lab 或 Jupyter notebook 时收到以下日志-

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

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

(我使用的是 Linux - Manjaro i3 社区版)

我已将 Jupyter 配置为使用 google-chrome-stable by

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 浏览器,但我试图避免这种情况。

【问题讨论】:

  • 尝试google-chrome 而不是google-chrome-stable 前者对我有用,后者对我无效。此外,您的发行版/Chrome 版本/安装方式(系统包管理器/flatpak/snap)可能是相关且有用的信息。
  • google-chrome 对我不起作用。 google-chrome-stable 是我安装的包。我更新了问题以声明我正在使用 Manjaro。

标签: jupyter-notebook jupyter jupyter-lab


【解决方案1】:

张贴dsjamieson的回答here

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

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

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-08-15
    • 1970-01-01
    • 2021-04-14
    • 2018-10-07
    • 1970-01-01
    • 1970-01-01
    • 2021-12-03
    • 1970-01-01
    相关资源
    最近更新 更多