Python·Jupyter Notebook各种使用方法记录

2018-03-28  本文已影响0人  幽蓝鑫晨

修改 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. 进入工作目录文件夹
  2. 键盘Shift+鼠标右键->在此处打开命令窗口-> 在弹出的命令窗口中输入:Jupyter Notebook


    image.png
    image.png
  3. Jupyter被打开,定位到当前目录!


    image.png

修改 jupyter notebook 默认浏览器

方案:

  1. 打开文件 jupyter_notebook_config.py


    image.png

    2.添加:

 import webbrowser
 webbrowser.register("chrome", None, webbrowser.GenericBrowser(u"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"))
c.NotebookApp.browser = 'chrome'

Jupyter的各种快捷键

上一篇 下一篇

猜你喜欢

热点阅读