配置Jupyter服务器

 

在本机开启了jupyter之后默认是无法远程访问的,需要修改配置文件。

生成配置文件

jupyter notebook --generate-config

设置密码

jupyter notebook password

修改jupyter_notebook_config.py配置文件


## Whether to allow the user to run the notebook as root.
c.NotebookApp.allow_root = True

## 允许任何ip.
c.NotebookApp.ip = '0.0.0.0'

## 默认打开位置.
c.NotebookApp.notebook_dir = u'C:/Users/Documents/jupyter'

c.NotebookApp.open_browser = False

## 设置端口号.
c.NotebookApp.port = 8080

# 用密码登录
c.NotebookApp.allow_password_change = False

#  When disabled, equations etc. will appear as their untransformed TeX source.
c.NotebookApp.enable_mathjax = True

启动jupyter服务:jupyter lab,只需要notebook:jupyter notebook

参考:官方文档