- 设置默认路径:
打开cmd 输入jupyter notebook --generate-config,回车
会提示在用户文件夹下创建了一个py文件
C:\Users\用户名>jupyter notebook --generate-config
Writing default config to: C:\Users\用户名\.jupyter\jupyter_notebook_config.py
C:\Users\用户名>
jupyter_notebook_config.py 为jupyter的配置文件,在这个文件里可以设置自己的jupyter 风格
这里我把打开jupyter 的默认路径更改了:
去掉前面的‘#’号,添加自己的文件路径就可以了
#c.NotebookApp.notebook_dir = ''
修改为
c.NotebookApp.notebook_dir = 'E:\\Myself\\path\\to\\jupyter'
这样打开不管在哪个文件夹下,打开jupyter notebook都会指向jupyter这个目录。
当然也可以在打开jupyter的时候 指定一个目录比如:
jupyter notebook D:/tools