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 &

相关推荐
少林码僧5 小时前
2.31 机器学习神器项目实战:如何在真实项目中应用XGBoost等算法
人工智能·python·算法·机器学习·ai·数据挖掘
智航GIS5 小时前
10.4 Selenium:Web 自动化测试框架
前端·python·selenium·测试工具
jarreyer6 小时前
摄像头相关记录
python
宝贝儿好6 小时前
【强化学习】第六章:无模型控制:在轨MC控制、在轨时序差分学习(Sarsa)、离轨学习(Q-learning)
人工智能·python·深度学习·学习·机器学习·机器人
大、男人6 小时前
python之asynccontextmanager学习
开发语言·python·学习
默默前行的虫虫7 小时前
nicegui文件上传归纳
python
一个没有本领的人7 小时前
UIU-Net运行记录
python
国强_dev7 小时前
Python 的“非直接原因”报错
开发语言·python
副露のmagic7 小时前
更弱智的算法学习 day24
python·学习·算法
廖圣平8 小时前
从零开始,福袋直播间脚本研究【三】《多进程执行selenium》
python·selenium·测试工具