1 generates the configuration file
linux and mac open system terminal
windows open system terminal comes anaconda
jupyter notebook --generate-config
And will generate ~ / .jupyter / hide the folder, and the folder are generated in a configuration file jupyter_notebook_config.py jupyter
2 ports configured password + + + remote landing start working directory + mathjax
2.1 jupyter generated passwords
Open IDE or the command line, type the following command
from notebook.auth import passwd
passwd()
# 此时需要输入两次密码(一次设置,一次确认),然后生成sha1的密文,拷贝下来。
# Enter password: ········
# Verify password: ········
# sha1:b11ba7ae862e:6eeb922ef6b770e43a1c90922ba341faaaaaaaa
Need to type the password twice after entering passwd (), then will have some ciphertext
2.2 modify the configuration file jupyter_notebook_config.py
Open jupyter_notebook_config.py, scroll to the last line of the file, add the following configuration options
# 允许所有ip访问
c.NotebookApp.ip='*'
# 密码 2.1中生成'sha1:xxxx"那一大串,复制时包括sha1
c.NotebookApp.password = 'sha1:0d00e0994444:3aeecafab4d91260d42647df8df4c3859a3430a9'
# 是否打开浏览器
c.NotebookApp.open_browser = False
# 指定端口 jupyter的默认端口为8888
c.NotebookApp.port = 10000
# 启用 MathJax
c.NotebookApp.enable_mathjax = True
# 修改工作空间文件夹 '/home/jupyter/'改成你的目录
c.NotebookApp.notebook_dir = '/home/jupyter/'
2.3 Starting jupyter notebook
Use jupyter notebook started on the server, then the machine via http: // address_of_remote: 10000 remote access to login screen requires a password set.
3 Jupyter installation nbextensions
If you have installed, unmount command:
pip uninstall jupyter_contrib_nbextensions
pip uninstall jupyter_nbextensions_configurator
Anaconda Prompt window opens, first command is executed, for mounting nbextensions:
pip install jupyter_contrib_nbextensions
Then execute a second command, for mounting javascript and css files
jupyter contrib nbextension install --user
The last execution for installation configurator
pip install jupyter_nbextensions_configurator
Then restart Jupyter Notebook, you will find the label has Nbextensions.
Common extensions, you can check on:
The most common explanation, we recommend checking on:
- Collapsible headings folding title
- Notify notification mechanism, running some of the longer time-consuming task, after completion notification
- Codefolding collapsing code
- Zen mode extension to hide the status bar activities to facilitate pay attention to the code
- Execute time extension to display the running time