【Python实践】修改jupyter notebook的默认路径

我的系统环境是win10,安装了anaconda3 for python 3.6.6
首先需要配置notebook的变量环境:打开 cmd 输入命令 jupyter notebook --generate-config,根据下一步的提示输入命令y,最后成功在C:\Users\你的用户名.jupyter目录中生成jupyter_notebook_config.py文件。

C:\Users\Administrator>jupyter notebook --generate-config
Overwrite C:\Users\Administrator\.jupyter\jupyter_notebook_config.py with default config? [y/N]y
Writing default config to: C:\Users\Administrator\.jupyter\jupyter_notebook_config.py

但通过改写jupyter_notebook_config.py文件中”c.NotebookApp.notebook_dir“语句的方式并不能改变jupyter notebook的默认路径。采用以下办法:

右键jupyter notebook,打开属性中的快捷方式,将目标最后的%USERPROFILE%前加上需要的默认路径,就成功了。
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_22263683/article/details/82794493
今日推荐