jupyter notebook无法自动打开浏览器解决方案

首先安装好jupyter notebook,我自己使用的anaconda环境,比较方便。conda install jupyeter notebook安装好后打开cmd,输

首先安装好jupyter notebook,我自己使用的anaconda环境,比较方便。

conda install jupyeter notebook

安装好后打开cmd,输入jupyter notebook,出现如下情况,无法自动跳转到浏览器,每次都要自己手动复制网址,很麻烦。

解决方案如下:

import webbrowser
webbrowser.register('chrome',None,webbrowser.GenericBrowser(r"C:\Users\11201\AppData\Local\Google\Chrome\Application\chrome.exe"))
c.NotebookApp.browser = 'chrome'

到C:\Users\11201.jupyter目录下找到文件jupyter_notebook_config,我自己装在了C盘,根据每个人的情况自己确定,然后点进去找到c.NotebookApp.browser = ’ '这行,大概在101行。chrome是自己所用的浏览器,C:\Users\11201\AppData\Local\Google\Chrome\Application\chrome.exe是浏览器所在的位置,添加进来,control+s保存,重新再cmd中输入jupyter notebook,就会自动跳转到指定浏览器。

发布者:admin,转转请注明出处:http://www.yc00.com/web/1753988227a5104572.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信