栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

腾讯云配置jupyter notebook远程登录

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

腾讯云配置jupyter notebook远程登录

腾讯云配置jupyter notebook远程登录
  • 我的环境
  • 操作步骤
  • 其他

我的环境

腾讯云云服务器
操作系统Ubuntu Server 20.04 LTS 64位
配置时间在21年10月

操作步骤
  1. 下载Anaconda安装包
    登录云服务器,从清华镜像源找到合适的Anaconda安装包,使用wget命令下载
    清华镜像源:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
    笔者选择的是Anaconda3-2021-Linux-x86_64.sh
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2021.05-Linux-x86_64.sh
  1. 安装Anaconda
    使用sh命令,一路yes无脑安装
sh Anaconda3-2021-Linux-x86_64.sh
  1. 生成jupyter notebook配置文件
jupyter notebook --generate-config

运行后在/home/ubuntu生成.jupyter目录

  1. 修改配置文件
vim .jupyter/jupyter_notebook_config.py

初始时里面所有内容都是注释掉的,在配置文件里面添加:

c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888
  1. 后台运行jupyter notebook
nohup jupyter notebook & 

查看jupyter notebook相关进程,关闭进程

ps -aux | grep jupyter
kill -9 pid
  1. 然后就可以在本地浏览器使用公网IP:8888远程访问云服务器上的jupyter notebook啦
其他
  1. 可以设置密码登录,可以参考这个博客https://cloud.tencent.com/developer/article/1194200
  2. 遇到一直显示密码invalid的情况,可以强行重置密码
jupyter notebook password
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/350433.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号