修改Jupyter Notebook的默认路径

出处:如何修改Jupyter Notebook的默认路径 by 杨梅泡酒

  1. 查看Jupyter使用的配置文件在哪个目录:
jupyter --config-dir
  1. 切换到该目录,检查是否存在配置文件:jupyter_notebook_config.py。如果不存在,使用以下命令创建一个:
jupyter notebook --generate-config
  1. 在配置文件jupyter_notebook_config.py中,添加以下配置内容:
## The directory to use for notebooks and kernels.
## d:\learning为新的Jupyter目录,可以替换成你自己的目录。
c.NotebookApp.notebook_dir = 'd:\\learning'
  1. 从Anaconda重新运行JupyterLab
阅读量: | 柯西君_BingWong | 2023-02-16