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 &

相关推荐
2501_941111344 分钟前
实战:用OpenCV和Python进行人脸识别
jvm·数据库·python
ada7_4 分钟前
LeetCode(python)——73.矩阵置零
python·算法·leetcode·矩阵
程序员爱钓鱼16 分钟前
Python编程实战:用好 pdb 和 logging,程序再也不黑箱运行了
后端·python·trae
程序员爱钓鱼17 分钟前
Python编程实战:从 timeit 到 cProfile,一次搞懂代码为什么慢
后端·python·trae
2501_9411115124 分钟前
Python多线程与多进程:如何选择?(GIL全局解释器锁详解)
jvm·数据库·python
2501_9411113331 分钟前
使用Python处理计算机图形学(PIL/Pillow)
jvm·数据库·python
小小测试开发1 小时前
Python数据科学与图像处理利器组合:Prophet、Arch、Scikit-image、Pillow-heif用法全解析
图像处理·python·pillow
2501_941111371 小时前
Django全栈开发入门:构建一个博客系统
jvm·数据库·python
2501_941111344 小时前
Python上下文管理器(with语句)的原理与实践
jvm·数据库·python
晨非辰4 小时前
【数据结构初阶系列】归并排序全透视:从算法原理全分析到源码实战应用
运维·c语言·数据结构·c++·人工智能·python·深度学习