The most practical modification jupyter default working directory

problem:

For starters speaking, when we installed python, jupter notebook, and then excitedly open interface page code, the feeling will be an ignorant force. These files are a mess of what, why he was here, it would exist?

In fact, the cause of the problem is because we do not give jupter configure a working directory, install down before working directory is the default. So we need to set your own working directory, that specifically how does it work?

Jupyter modify the default file path, there are three steps, and there are only two answers to many online stores the result still in the original path of the file, simply does not work. Return to the topic, here to Anaconda 3 for example, the operation of the system is Win 10.

Here Insert Picture Description

Step 1: win + r and open command: input jupyter notebook --generate-config

Here Insert Picture Description

After clicking confirm, you can see such a screen of:

Here Insert Picture Description
Open positions corresponding directory in accordance with:
Here Insert Picture Description

Step 2: Add jupyter_notebook_config.py profile

Jupyter_notebook_config.py found in the corresponding directory file, use Notepad to open the file, just click "ctrl + F" to find c.NotebookApp.notebook_dir, this turned out to be the following styles:

At The Directory to use for ## Notebooks and kernels'.
# C.NotebookApp.notebook_dir = ''
Here Insert Picture Description
added the need to preserve path '' in with a double slash \ split path (single slash \ can, which is in the Windows environment under), and delete the foremost #

[Name not to be named best Chinese]
Here Insert Picture Description

Step 3: modifying certain properties Jupyter Notebook

Usually it comes in front of two steps, a test result, like the original, as well as the next step

"Start" Anaconda File menu found in Jupyter Notebook, right-click "Properties", delete the target of% USERPROFILE%, does not work to add to the storage location "E: \ Jupyter_NoteBook" (simply direct plus), the following example :

Jupter Notebook Open
Here Insert Picture Description
Here Insert Picture Description
End Operation above three steps, to get!


Very neat interface:
Here Insert Picture Description
Here Insert Picture Description

Reference article

Other Sao operation, also hope a lot of attempts to try to
add a directory of jupyter notebook

Published 17 original articles · won praise 10 · views 1677

Guess you like

Origin blog.csdn.net/weixin_44976611/article/details/104750180