什么是JupyterLab?
JupyterLab is the next-generation user interface for Project Jupyter offering all the familiar building blocks of the classic Jupyter Notebook (notebook, terminal, text editor, file browser, rich outputs, etc.) in a flexible and powerful user interface. JupyterLab will eventually replace the classic Jupyter Notebook.
简单的来讲,JupyterLab 是Jupyter Notebook 的下一代产品,集成了更多的功能,最终会慢慢代替Jupyter Notebook。
安装
可以使用conda 或者 pip 来安装
Conda
conda install -c conda-forge jupyterlab
Pip
pip install jupyterlab
运行
jupyter lab
JupyterLab 就会自动在浏览器运行。
⚠️ 这里启动时遇到一个问题:

ImportError: cannot import name 'secure_write' from 'jupyter_core.paths'
👋 解决方法,更新:
pip3 install jupyter_core --upgrade
如果用conda 的话:
conda update jupyter_core
依赖和支持的浏览器
需要安装,Jupyter notebook 的 4.3或之后版本。
最新的版本可以在以下的浏览器中运行:
- Firefox
- Chrome
- Safari
成功运行!

我在Settings 里面将主题设置成了Dark,跟系统的暗黑系就很搭了。
安装插件
安装插件可以使用命令行工具:
jupyter labextension install @jupyterlab/toc
也可以在页面内使用管理工具安装,但是默认插件栏是不显示的,需要设置,显示插件栏。

在User Preferences 里输入{'enabled':true}点击右上角保存,点击红色的Enable ,侧边就会出现插件栏了。



接下来我就用Jupyter Lab 学习python 和做笔记了。
本文介绍JupyterLab作为JupyterNotebook的下一代产品,提供了更强大的功能和灵活的界面。文章详细讲解了如何通过conda和pip进行安装,解决常见错误,并介绍了支持的浏览器。此外,还演示了如何配置主题和安装插件,为学习Python和做笔记提供了一个高效的工作环境。
5331





