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 &

相关推荐
l木本I28 分钟前
uv 技术详解
人工智能·python·深度学习·机器学习·uv
宁大小白41 分钟前
pythonstudy Day31
python·机器学习
江上鹤.1481 小时前
Day34模块和库的导入
python
我爱鸢尾花1 小时前
第十四章聚类方法理论及Python实现
大数据·python·机器学习·数据挖掘·数据分析·聚类
言之。2 小时前
Dropbear远程连接
python
dhdjjsjs3 小时前
Day34 PythonStudy
python
一个java开发3 小时前
Dask 配置文件加载机制说明
大数据·python
bj_zhb3 小时前
图片的base64表示
python·llm
飞Link3 小时前
【Django】Django 调用外部 Python 程序的完整指南
后端·python·django·sqlite
周杰伦_Jay3 小时前
【Java集合与线程池深度解析】底层原理+实战选型+避坑指南(附代码)
java·开发语言·python