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

48.远程连接linux服务器中jupyter服务器配置

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

48.远程连接linux服务器中jupyter服务器配置

远程连接linux服务器中jupyter服务器配置: 1)转换环境:
  conda env list 
  source activate **** 
2)生成jupyter配置文件:
   jupyter notebook --generate-config  

#此命令会在目录~下生成.jupyter文件夹及jupyter_notebook_config.py配置文件

3)生成密钥,用于登录jupyter
  jupyter notebook password
4)修改2)中生成的jupyter的配置文件:

①

  vi ~/.jupyter/jupyter_notebook_config.py

回车
②
在文件末增加内容(文件很长,快捷键-大写G,直接跳到文件末尾):

   c.NotebookApp.allow_remote_access = True
   c.NotebookApp.open_browser = False
   c.NotebookApp.ip = '*'
   c.NotebookApp.allow_root = True
   c.NotebookApp.port = 1111

注:上述属性在配置文件中默认都是注释掉,而且文档较长,一个个找起来修改比较麻烦,索性在文件末尾直接配置。
③esc退出编辑模式,:wq 保存退出。

5)后台运行:
nohup jupyter notebook > ~/.jupyter/jupyter.log 2>&1 &

jupyter进程:

ps -aux | grep jupyter

查端口:

netstat -ntlp
6)本地登录:
http://192.***.**.**:1111/

注意:
jupyter 500 : Internal Server Error错误

pip install --upgrade --user nbconvert
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1011554.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

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

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