jupyter notebook修改默认浏览器、anaconda powershell prompt打开jupyter notebook

anaconda powershell prompt打开jupyter notebook

1、打开anaconda prompt

2、输入jupyter notebook --generate-config

3、显示出jupyter_notebook_config.py 文件所在目录。找到这个文件,用记事本打开。

4、Ctrl+F搜索’’# c.NotebookApp.browser = ‘’

在’’# c.NotebookApp.browser = ‘’ 后加入下面语句块:

import webbrowser

webbrowser.register("chrome",None,webbrowser.GenericBrowser(u"C:\\Users\\asus\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe"))

c.NotebookApp.browser = 'chrome'

5、上条中地址应替换为本机中chrome实际安装地,查看方法为开始菜单-chrome-右键点击属性,快捷方式页签有目标,是完整路径,粘在上面即可。注意表示目录的“\”要改变为双“\”

6、输入“cd 文件路径”
输入jupyter notebook,启动jupyter notebook


7、以后打开路径:anaconda prompt → 输入:cd C:\Users\asus\Desktop\iPython → 输入:jupyter notebook

猜你喜欢

转载自blog.csdn.net/qq_43210525/article/details/108766154