网站设计培训班老师,东莞做网站最好的是哪家,网站建设 技术 哪些内容,网站首页面设计【JupyterLab】在 conda 虚拟环境中 JupyterLab 的安装与使用 1 JupyterLab 介绍2 安装2.1 Jupyter Kernel 与 conda 虚拟环境 3 使用3.1 安装中文语言包(Optional)3.2 启动3.3 常用快捷键3.3.1 命令模式下 3.4 远程访问个人计算机3.4.1 局域网下 1 JupyterLab 介绍 官方文档: … 【JupyterLab】在 conda 虚拟环境中 JupyterLab 的安装与使用 1 JupyterLab 介绍2 安装2.1 Jupyter Kernel 与 conda 虚拟环境 3 使用3.1 安装中文语言包(Optional)3.2 启动3.3 常用快捷键3.3.1 命令模式下 3.4 远程访问个人计算机3.4.1 局域网下 1 JupyterLab 介绍 官方文档: Link JupyterLab 是 Project Jupyter 旗下其他笔记本编写应用程序如 Jupyter Notebook 和 Jupyter Desktop的同胞兄弟。与 Jupyter Notebook 相比JupyterLab 提供了更先进、功能更丰富、可定制的体验。
2 安装 官方文档: Link pip install jupyterlab2.1 Jupyter Kernel 与 conda 虚拟环境
本人目前的建议是在每个虚拟环境中都完整地安装 jupyterlab在运行前一定要激活所需的虚拟环境。
在使用时用这个默认的 Kernel 即可它调用的就是所在虚拟环境的 Python Interpreter。 可以用下面的代码运行验证一下
import os
import sys
print(fPython 版本信息: {sys.version})
print(f\n解释器路径: {sys.executable})
print(f\n当前工作目录: {os.getcwd()})此外这篇问答 How to use Jupyter notebooks in a conda environment? 给出了 3 种不同的使用方式想要尝试的话可以参考。
3 使用
3.1 安装中文语言包(Optional) 官方文档: Link pip install jupyterlab-language-pack-zh-CN将页面切换为中文 3.2 启动
--no-browser: 禁止启动时自动打开浏览器--ipUnicode: Jupyter 服务器监听的 IP 地址默认为 localhost--portInt: Jupyter 服务器监听的端口--notebook-dirUnicode: 工作目录顶层--app-dirUnicode: 启动时所在的目录包含于 notebook-dir--pylabUnicode: 默认为 disabled需要在 notebook 中使用 %pylab 或 %matplotlib 来启用 matplotlib
jupyter lab --notebook-dirE:/ --preferred-dir E:/Documents/Somewhere/Else3.3 常用快捷键
ESC: 切换到命令模式ENTER: 切换到编辑模式Ctrl Enter: 运行 CellShift Enter: 运行 Cell并切换至下一个 Cell
3.3.1 命令模式下
a: 上方插入新 Cellb: 下方插入新 Celly: 将 Cell 转为 Codem: 将 Cell 转为 Markdownd d: Restart Kernel
3.4 远程访问个人计算机
默认情况下Jupyter 服务器在本地运行地址为 127.0.0.1:8888只能从 localhost 访问。
3.4.1 局域网下
jupyter lab --notebook-dirE:/ --preferred-dir E:/Documents/Somewhere/Else --ip192.168.31.177 --port12345 --no-browser待更ing