未找到 Web 浏览器:找不到可运行的浏览器。 Jupyter笔记本

新手上路,请多包涵

Jupyter-notebook 不会打开网络浏览器。之前它工作得很好,然后在 Windows 10 提示更新后它开始在 Microsoft edge 中打开。当我尝试将其更改为默认浏览器(现在是 chrome)时,它根本无法打开。

我按照 how to open Jupyter notebook in chrome on windows 尝试将其改回 chrome。

当我尝试跑步时

jupyter notebook

在 cmd 中,我得到的只是

[I 21:39:08.015 NotebookApp] JupyterLab extension loaded from C:\Users\roy\Anaconda3\lib\site-packages\jupyterlab
[I 21:39:08.015 NotebookApp] JupyterLab application directory is C:\Users\roy\Anaconda3\share\jupyter\lab
[I 21:39:08.015 NotebookApp] Serving notebooks from local directory: C:\Users\roy
[I 21:39:08.015 NotebookApp] The Jupyter Notebook is running at:
[I 21:39:08.015 NotebookApp] http://localhost:8888/?token=d0a958999d7e59da3f097809882e8f40eb5845e3a07cebe8
[I 21:39:08.031 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 21:39:08.109 NotebookApp] No web browser found: could not locate runnable browser.

    To access the notebook, open this file in a browser:
        file:///C:/Users/roy/AppData/Roaming/jupyter/runtime/nbserver-1516-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=d0a958999d7e59da3f097809882e8f40eb5845e3a07cebe8

但是,当我在网络浏览器中复制并粘贴 url 时,它就可以正常工作。

原文由 David Odhiambo Nyerere 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 945
1 个回答

解决了。

我转到我的用户目录中的 .jupyter 文件夹 > 打开 jupyter_notebook_config.py 文件 > 然后从 c.NotebookApp.browser = ‘C:\Program Files (x86)\Google\Chrome\Application\chrome.exe ’ 编辑这一行到 c.NotebookApp.browser = u’C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s’

现在效果很好。

原文由 David Odhiambo Nyerere 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题