1.Install anaconda
The conda environment and jupyter notebook are installed on the default server.
2. Generate default configuration file
By default, the configuration file ~/.jupyter/jupyter_notebook_config.py does not exist and needs to be created by yourself. Use the following command to generate the configuration file:
jupyter notebook --generate-config
The computer displays as follows:
(base) C:\Users\1>jupyter notebook --generate-config
Writing default config to: C:\Users\1\.jupyter\jupyter_notebook_config.py
3. Generate secret key
ipython
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'argon2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
In [3]: exit
4. Password to be added
c.NotebookApp.password = u'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'
5. Modify configuration file
Find the following line in jupyter_notebook_config.py, uncomment and modify it.
c.NotebookApp.ip='*'
c.NotebookApp.allow_remote_access = True
c.NotebookApp.password = u'sha:ce...刚才复制的那个密文'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888 #可自行指定一个端口, 访问时使用该端口
6. Only open specific folders
c.NotebookApp.notebook_dir = ''
7. Query computer IP
1. Use Windows+R keys to open the "Run" window, and then enter CMD to enter the command prompt window.
2. After entering the command window, enter:
ipconfig
Find
IPv4 address