1.打開命令行( win+R,輸入cmd,然後按回車鍵 ),輸入:
jupyter notebook --generate-config
此時會生成一個 jupyter_notebook_config.py 的文件,文件路徑在 C:\Users\用戶名\ .jupyter\ 下
2.打開 jupyter_notebook_config.py 文件,找到
## The directory to use for notebooks and kernels.
#c.NotebookApp.notebook_dir = ''
將要指定的路徑填入 #c.NotebookApp.notebook_dir = ’ ’ 中的 ’ ’ 中即可,同時注意將 #c 中的 # 刪去,:
c.NotebookApp.notebook_dir = 'D:\jupyterProject'
在Anaconda Prompt的shell窗口中輸入:
jupyter notebook
就可以打開剛纔在配置中指定的workspace了