jupyter环境配置

参考

    这里主要介绍使用过程中遇到的两个问题以及解决方案:

    一、修改 jupyter notebook 默认工作目录:

        方案一:1、(win+r)打开 cmd 输入命令:jupyter notebook --generate-config

                       2、找到文件 jupyter_notebook_config.py (C:\Users\Administrator\.jupyter 中)

                       3、打开该文件 找到  #c.NotebookApp.notebook_dir = ''  并添加(将其修改为):c.NotebookApp.notebook_dir = u'D:\\python' (注意将#号删除,注意是\\双斜线,注意事项,不支持中文,可以有空格)

       方案二:1、进入工作目录(如:“D:\python”)

                      2、按着 shift 键 点击鼠标右键 选择 “在此处打开Powershell窗口(S)”

                      3、进入Powershell窗口输入 “jupyter notebook”

    二、修改 jupyter notebook 默认浏览器:

          方案:1、打开文件 jupyter_notebook_config.py (C:\Users\Administrator\.jupyter 中)

                     2、找到 # c.NotebookApp.browser = ''''

                     3、添加:

                                   import webbrowser

                                   webbrowser.register("chrome", None, webbrowser.GenericBrowser(u"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"))

                                   c.NotebookApp.browser = 'chrome'

猜你喜欢

转载自blog.csdn.net/qq_15905107/article/details/81385554