SoFunction
Updated on 2024-11-16

Detailed explanation of the three ways to change the default working path of Jupyter Notebook in Anaconda

Mode 1.

Open the Windows cmd, and in cmd typejupyter notebook --generate-configBelow:

注意y/N输入N 

You can see that the path is D:\Users...... find this path to modify the jupyter_notebook_config.py file

这里写图片描述 

Open this file and find the

## The directory to use for notebooks and kernels. 
#.notebook_dir = '' 

Replace it with the following

## The directory to use for notebooks and kernels. 
.notebook_dir = 'E:\Jupyter'

where E:\Jupyter is my workspace, which you can change to your own.

Caution.

1. The # in #.notebook_dir = '' must be deleted and must not be preceded by a space.
:\ Jupyter, Jupyter folder must be created in advance of the new, if not new, Jupyter Notebook will not find this file, will produce flashback phenomenon.

Mode 2

Find the shortcut created by Anaconda

这里写图片描述

Right-click Properties to enter and change the address of the starting location to E:\Jupyter, and then apply it successfully!

这里写图片描述 

Mode 3

Open the etc file in the Anaconda installation directory e.g. C:\Anaconda3\etc\jupyterMy installation directory is in C:\Anaconda3

这里写图片描述

Just open the jupyter_notebook_config.json file again and make the following changes:

这里写图片描述

to this article on the details of the modification of Anaconda in the Jupyter Notebook default working path of the three ways the article is introduced to this, more related to Anaconda Jupyter Notebook default working path content, please search for my previous posts or continue to browse the following related articles I hope that you will support me in the future more!