【详细】jupyter notebook远程连接服务器配置教程

(默认服务器上安装好了conda环境和jupyter notebook)

1. 生成默认配置文件

jupyter notebook --generate-config

2. 进入Python终端,生成秘钥

ipython
In [1]: from notebook.auth import passwd

In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'argon2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

In [3]: exit

这里要求你输入以后登录使用的密码,然后生成一个秘钥,记得保存好秘钥,以免丢失。

3. 修改配置文件

vim ~/.jupyter/jupyter_notebook_config.py

将下面的几项取消注释并修改:


c.NotebookApp.allow_remote_access = True   #老版的需要此设置
c.NotebookApp.ip='*'#×允许任何ip访问
c.NotebookApp.open_browser = False
c.NotebookApp.password = 'argon2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
c.NotebookApp.port =8888 #可自行指定一个端口, 访问时使用该端口

检测是否配置成功

在服务器开启jupyter notebook

浏览器不会自动开启
其他电脑在浏览器输入服务器ip:8888

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值