如何在Windows中更改Jupyter Notebook使用的默认浏览器 [英] How to change the default browser used by jupyter notebook in windows

查看:578
本文介绍了如何在Windows中更改Jupyter Notebook使用的默认浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在没有管理员权限的Windows机器上,我想在chrome上运行jupyter,而默认浏览器是另一个.

I'm on a windows machine without admin right and I would like to run jupyter on chrome, while the default browser is another.

我在本地安装了Anaconda发行版,而启动jupyter的第一个选择是通过Anaconda Navigator,但也许我需要做其他事情.因为它是本地安装,所以命令行jupyter notebook不会产生任何结果.

I have a local installation of the Anaconda distribution and my first option to start jupyter would be through the Anaconda Navigator, but maybe I have to do something else. Because it is a local installation the command line jupyter notebook produces no results.

当我在默认浏览器中粘贴网址时(例如http://localhost:8892/notebooks/Home/Exercices/Testing1.ipynb,chrome页面要求我输入密码或令牌.我没有密码,也不知道令牌是什么.

When I paste the url address in the default browser I have (something like http://localhost:8892/notebooks/Home/Exercices/Testing1.ipynb the chrome page asks me for a password or token. I have no password and I do not know what a token is.

是否可以更改Anaconda Navigator的浏览器?或如何使用Chrome启动jupyter?

Is there a way to change the browser of the Anaconda Navigator? or how can I start jupyter with Chrome?

推荐答案

感谢@Darthdith和本文

Thanks to @Darthdith and this post How to change the default browser used by the ipython/jupyter notebook in Linux? I was able to figure it out:

第1步:从开始"菜单中打开Anaconda Prompt,然后键入

Step 1: To open Anaconda Prompt from the Start Menu and type

jupyter notebook --generate-config

这将生成文件~/.jupyter/jupyter_notebook_config.py

第2步:编辑此文件并更改以下行(本地安装中也包含chrome)

Step 2: Edit this file and change the following line (chrome is also is also in a local installation)

c.NotebookApp.browser = u'C:/Home/AppData/Local/Google/Chrome/Application/chrome.exe %s'

这篇关于如何在Windows中更改Jupyter Notebook使用的默认浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆