1、在命令中输入命令

jupyter notebook --generate-config
(base) C:\Users\chris> jupyter notebook --generate-config
 Writing default config to: C:\Users\chris.jupyter\jupyter_notebook_config.py
(base) C:\Users\chris>

2、编辑文件 jupyter_notebook_config.py ,修改目录D:\日常工作\开发\python

编辑 C:\Users\chris.jupyter\jupyter_notebook_config.py 
## Dict of Python modules to load as notebook server extensions.Entry values can
#  be used to enable and disable the loading ofthe extensions. The extensions
#  will be loaded in alphabetical order.
#c.NotebookApp.nbserver_extensions = {}

## The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = '你的新工作目录'

## Whether to open in a browser after starting. The specific browser used is
#  platform dependent and determined by the python standard library `webbrowser`
#  module, unless it is overridden using the --browser (NotebookApp.browser)
#  configuration option.
#c.NotebookApp.open_browser = True

3、修改 Jupyter Notebook快捷方式,右键属性,删除目标(T)目录中的 %USERPROFILE%

4、重新启动 Jupyter 后就完成了工作目录的修改。


如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!



0 条评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注