jupyter-notebook 安装及远程访问
Introduction
Jupyter Notebook(此前被称为 IPython notebook)是一个交互式笔记本,支持运行 40 多种编程语言
Jupyter Notebook 的本质是一个 Web 应用程序,便于创建和共享文学化程序文档,支持实时代码,数学方程,可视化和 markdown
Install
pip install jupyter
Start
jupyter-notebook
Remote Visit
# create config
jupyter notebook --generate-config
# config passwd
ipython
from notebook.auth import passwd
passwd()
Enter password:
Verify password:
Out[2]: 'sha1:15403540516a:71855952007c3cb7421f9f2b2b54623a897febc4'
# modify config
vim ~/.jupyter/jupyter_notebook_config.py
c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha1:15403540516a:71855952007c3cb7421f9f2b2b54623a897febc4'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888 #随便指定一个端口
常见问题
- 描述:jupyter开启远程访问以及遇到No address associated with hostname问题
- 解决方案:将c.NotebookApp.ip='*' 改为 c.NotebookApp.ip='0.0.0.0'