Jupyter Notebook 开启远程登录

Jupyter Notebook可以说是非常好用的小工具,但是不经过配置只能够在本机访问

安装jupyter notebook

conda install jupyter notebook

生成默认配置文件

jupyter notebook --generate-config

将会在用户主目录下生成.jupyter文件夹,其中jupyter_notebook_config.py就是刚刚生成的配置文件

配置访问密码

bash 复制代码
jupyter notebook password #设置 jupyter 的密码,并生成自己配置文件,目录在 ~/.jupyter/jupyter_notebook_config.py test123456

修改配置文件

修改用户主目录下~/.jupyter/jupyter_notebook_config.py文件

text 复制代码
c.NotebookApp.ip='*'
c.NotebookApp.open_browser = False
c.NotebookApp.port=8888

测试

在服务器开启jupyter notebook

  • 浏览器不会自动开启
  • 其他电脑在浏览器输入服务器ip:8888,能够访问jupyter notebook

jupyter notebook

有如下提示

在笔记本浏览器输入外网ip:8888

成功远程访问服务器的jupyter notebook
输入设置的密码即可进入

后台启动

nohup jupyter notebook --allow-root > /root/nohup.log &

相关推荐
databook10 小时前
Manim实现闪光轨迹特效
后端·python·动效
Juchecar11 小时前
解惑:NumPy 中 ndarray.ndim 到底是什么?
python
用户83562907805111 小时前
Python 删除 Excel 工作表中的空白行列
后端·python
Json_11 小时前
使用python-fastApi框架开发一个学校宿舍管理系统-前后端分离项目
后端·python·fastapi
数据智能老司机18 小时前
精通 Python 设计模式——分布式系统模式
python·设计模式·架构
数据智能老司机19 小时前
精通 Python 设计模式——并发与异步模式
python·设计模式·编程语言
数据智能老司机19 小时前
精通 Python 设计模式——测试模式
python·设计模式·架构
数据智能老司机19 小时前
精通 Python 设计模式——性能模式
python·设计模式·架构
c8i19 小时前
drf初步梳理
python·django
每日AI新事件19 小时前
python的异步函数
python