[Jupyter] working directory and password (Mac)

If you think there is a point to help praise it, what really do not waste your time and crab . This article is the old rules of what is listed first, you think you understand, do not waste time here, other research techniques, there are views can be put forward oh ~ ~ (I have only one request prohibited reproduced, made the article is in order for them to learn, the most annoying copy of the full network is, you can not like to eat this cake but please do not stain it)
this article is in two places

① how to modify the working directory
② How to set a password

How to modify the working directory

  1. Input terminal:
    jupyter notebook --generate-config
    generates a configuration file, the file path is displayed after a successful
    Here Insert Picture Description

  2. Open the configuration file in the path jupyter_notebook_config.py
    vim 上面图片中的路径(每个人的路径不一样,复制自己的)
    find c.NotebookApp.notebook_dir = modify for your own working directory
    after entering the input file
    /c.NotebookApp.notebook_dir
    will be able to find the specified line and then write their working directory in the back of quotation marks, like this
    Here Insert Picture Description
    Remember to remove the # sign in front

  3. Input
    :wq
    configured to save

  4. Enter in a terminal:
    jupyter notebook
    to open jupyter, you can write it in python web end!

How to set a password to jupyter

  1. Browser opens jupyter, a new python file, as shown below
    Here Insert Picture Description
  2. The first input line:
    from the passwd notebook.auth Import
    then executed, as shown below
    Here Insert Picture Description
    , or shift + enter and execute commands to the next line.
    The next line enter: passwd (), a password prompt, enter twice after the carriage return. (Enter your password, mine: bibabobobo), results are as follows
    Here Insert Picture Description
  3. Hashed password. The above chart we can see sha1: xxxxxxxxxxxx
    The second step generated sha1: .................. password copy it
  4. Open the configuration file jupyter_notebook_config.py again, find c.NotebookApp.password = The third step of the hashed password (Open and find a way to have written above, since that is the often gray white)
    here also need to pay attention to two places one is when jupyter_notebook_config.py modify this default configuration file are all in front of the # sign, if you want this line configuration to take effect, make sure the front of the # removed. The second point may be a piece of copy in sha1 password, many people may be wondering how to copy? Copy sha1: xxxxxxxx xxxxxxxx or copied directly answer the following?:
    Here Insert Picture Description
Published 21 original articles · won praise 20 · views 1880

Guess you like

Origin blog.csdn.net/weixin_43071838/article/details/104454927