anaconda下的jupyter notebook更改文件目录
在anaconda中打开任何环境的cmd prompt
输入jupyter notebook --generate-config
代码会生成配置文件jupyter_notebook_config.py,
具体位置在C:\Users\your_user_name\.jupyter
以文本方式打开此文件,这里用pycharm打开
ctrl+F搜索the directory to use for
这条注释,将注释下面的c.ServerApp.root_dir = "E:\jupyter"
中地址改为想要的地址,注意反斜杠\
加双引号""
,以及去除前面的注释符号#
,同时这行前面不能留空格。
随jupyter版本不同,有时下面的地址变量名不同,有时会是
c.NotebookApp.notebook_dir = 'E:\jupyter'
但他们的注释仍然是一样的:## The directory to use for notebooks and kernels.
,搜索这条注释即可