anaconda中的jupyter notebook打不开浏览器解决方法

问题描述

conda环境中,命令行输入jupyter notebook,打不开网页,jupyter notebook快捷方式也无反应

解决方法

在anaconda prompt命令行中,输入

jupyter notebook --generate-config

找到jupyter botebook的配置文件,jupyter_notebook_config.py

找到该文件,并用记事本打开,如下图
anaconda中的jupyter notebook打不开浏览器解决方法_第1张图片

利用ctrl+f快捷键搜索c.NotebookApp.password,找到下图位置
anaconda中的jupyter notebook打不开浏览器解决方法_第2张图片
在# c.NotebookApp.password = ''后面输入

import webbrowser
webbrowser.register('chrome',None,webbrowser.GenericBrowser
(u'******'))
c.NotebookApp.browser = 'chrome'

其中******为chrome的路径。
例如:
anaconda中的jupyter notebook打不开浏览器解决方法_第3张图片
注意:路径中的 \ 要替换为 \

最后,重新打开anaconda prompt命令行并输入jupyter notebook 就能正常打开网页了

你可能感兴趣的:(深度学习环境,系统安装,jupyter,python,ide)