暂无分类
暂无标签
发布于2021-02-20 06:47 阅读(823) 评论(0) 点赞(6) 收藏(2)
0
1
2
3
4
建议安装anaconda,自带python 和 jupyter lab
如果你已经在使用anaconda,并且也创建了虚拟环境,那么下面命令应当conda activate xxx 到在你的虚拟环境。
生成配置
jupyter lab --generate-config
默认的配置文件放在 "C:\Users\Administrator\.jupyter\jupyter_lab_config.py"
修改配置
c.ServerApp.allow_remote_access = True #设置允许远程访问 c.ServerApp.local_hostnames = ['192.168.1.xxx'] #设置主机名 c.ServerApp.root_dir = 'E:\\' #设置启动后的jupyterlab的笔记文件根目录 c.ServerApp.token = 'ddf3b439292e0f0027e36fafa3f70df04bf79c98936cb7d4' # 设置token 方便vscode配置jupyter
外部访问
外部浏览器访问 : http://192.168.1.xxx:8888/lab?token=ddf3b439292e0f0027e36fafa3f70df04bf79c98936cb7d4
vscode配置
Ctrl+shift+P 打开命令输入框
Jupyter: 创建新的空白jupyter 笔记本
Jupyter: 指定本地或着远程Jupyter服务器的连接--现有--填入 http://192.168.1.xxx:8888/lab?token=ddf3b439292e0f0027e36fafa3f70df04bf79c98936cb7d4 然后右下角会提示重启vscode,重启后,就可以创建一个笔记本用了
启动和停止jupyterlab
启动
- cmd窗口 jupyter lab
- conda navagator 点击 jupyter lab 的 Lunch按钮
停止
- cmd窗口 jupyter-lab stop 8888
注意事项
要想让修改后的配置文件正确加载,必须正确关闭jupyter lab,
正确关闭jupyter lab的方法: 浏览器网页端---文件---shutdown
所有的配置文件键值对,必须靠左定格写
原文链接:https://www.cnblogs.com/qq-757617012/p/14412569.html
0
1
2
3
4
作者:美美哒
链接: https://www.pythonheidong.com/blog/article/837469/8e9bcf7472242f4cc8f3/
来源: python黑洞网
任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任
昵称:
评论内容:(最多支持255个字符)
Copyright © 2018-2021 python黑洞网 All Rights Reserved 版权所有,并保留所有权利。 京ICP备18063182号-1
投诉与举报,广告合作请联系z452as@163.com或QQ3083709327
免责声明:网站文章均由用户上传,仅供读者学习交流使用,禁止用做商业用途。若文章涉及色情,反动,侵权等违法信息,请向我们举报,一经核实我们会立即删除!