远程访问Jupyter Notebook

远程服务器上操作

生成配置文件

jupyter notebook --generate-config

E:\credher\gitee
(python) λ jupyter notebook --generate-config
Overwrite C:\Users\hncjy\.jupyter\jupyter_notebook_config.py with default config? [y/N]y
Writing default config to: C:\Users\hncjy\.jupyter\jupyter_notebook_config.py

生成密码

从jupyter notebook5.0开始提供了一个命令来自动完成密码设置

jupyter notebook password

(python) λ jupyter notebook password
Enter password:
Verify password:
[NotebookPasswordApp] Wrote hashed password to C:\Users\hncjy\.jupyter\jupyter_notebook_config.json

修改配置文件

打开配置文件默认位于C:\Users\用户名.jupyter下的jupyter_notebook_config.json
在其中添加:

c.NotebookApp.ip = "*" # * 表示所有IP都可以访问
c.NotebookApp.port = 8888 # 指定访问端口
c.NotebookApp.allow_remote_access = True # 允许远程访问

本地访问

  1. 远程服务器中运行jupyter notebook

jupyter notebook

  1. 查看远程服务器的ip地址

ip addr

  1. 在本机浏览器中输入ip:port会弹出输入密码,就可以使用了

192.168.33.11:8888

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容