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 &

相关推荐
小北方城市网3 分钟前
Spring Cloud 服务治理实战:构建高可用微服务体系
spring boot·python·rabbitmq·java-rabbitmq·数据库架构
写代码的【黑咖啡】22 分钟前
Python中的Statsmodels:统计建模与假设检验
开发语言·python
程序员杰哥27 分钟前
Pytest自动化测试框架实战
自动化测试·软件测试·python·测试工具·职场和发展·测试用例·pytest
weixin_4331793334 分钟前
python - 函数 function
开发语言·python
不吃鱼的小时喵1 小时前
【Python】关于python多进程
python
喵手1 小时前
Python爬虫零基础入门【第六章:增量、去重、断点续爬·第1节】增量采集:只抓新增/更新(新手也能做)!
爬虫·python·python爬虫实战·python爬虫工程化实战·python爬虫零基础入门·增量、去重·增量采集
万粉变现经纪人2 小时前
如何解决 pip install pyodbc 报错 缺少 ‘cl.exe’ 或 ‘sql.h’(ODBC 头文件)问题
数据库·python·sql·网络协议·bug·ssl·pip
dazzle2 小时前
Python数据结构(五):队列详解
数据结构·python
翱翔的苍鹰2 小时前
完整的“RNN + jieba 中文情感分析”项目之一:需要添加添加 JWT 认证
人工智能·python·rnn
0思必得02 小时前
[Web自动化] 爬虫URL去重
运维·爬虫·python·selenium·自动化