Skip to content

Commit e57800a

Browse files
committed
Updated Jupyter installation guide
1 parent 38b0bca commit e57800a

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

T-appendix.jupyter-installation-and-setup.ipynb

+25-8
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,16 @@
303303
"> * [@jupyterlab/toc](https://github.com/jupyterlab/jupyterlab-toc)\n",
304304
"> * [ryantam626/jupyterlab_sublime](https://github.com/ryantam626/jupyterlab_sublime)\n",
305305
"\n",
306-
"首先在用快捷键 `⌘ ,` 打开 jupyter lab 的 Advanced Settings,在 Extension Manager 中,添加 User Overrides:\n",
306+
"如果JupyterLab 版本是 4.x ,jupyterlab-toc 已不用重新安装,因为这个插件已经被官方集成到 JupyterLab 4 里了;\n",
307+
"\n",
308+
"下面是安装jupyterlab_sublime的方法:\n",
309+
" \n",
310+
"首先如果JupyterLab 版本是 3.x 或 4.x,那么 Extension Manager 的设置方式和旧版本(如 2.x)不同,不再需要手动添加 \"enabled\": true:\n",
311+
"\n",
312+
" 用快捷键 `⌘ ,`打开 jupyter lab 的 Settings → Enable Extension Manager,直接勾选,系统会自动启用扩展管理功能;\n",
313+
"\n",
314+
"如果JupyterLab 版本是 2.x,\n",
315+
" 用快捷键 `⌘ ,`打开 jupyter lab 的 Advanced Settings,在 Extension Manager 中,添加 User Overrides:\n",
307316
"\n",
308317
"```json\n",
309318
"{\n",
@@ -313,12 +322,20 @@
313322
"\n",
314323
"而后在 Terminal 执行以下命令安装插件:\n",
315324
"\n",
316-
"```bash \n",
317-
"jupyter labextension install @jupyterlab/toc\n",
325+
"如果JupyterLab 版本 JupyterLab >= 3, 执行 \n",
326+
"\n",
327+
"```bash\n",
328+
"pip install jupyterlab_sublime\n",
329+
"```\n",
330+
"\n",
331+
"如果JupyterLab 版本JupyterLab < 3,执行\n",
332+
"```bash\n",
318333
"jupyter labextension install @ryantam626/jupyterlab_sublime\n",
319-
"jupyter lab build\n",
320334
"```\n",
321335
"\n",
336+
"且注意,如果JupyterLab 版本是 4.x, jupyter labextension install指令已废弃,要用 pip 或 conda 安装插件。\n",
337+
"\n",
338+
"\n",
322339
"toc 插件,自动将 ipynb 文件中的标题转换成目录。\n",
323340
"\n",
324341
"![](https://github.com/jupyterlab/jupyterlab-toc/raw/master/toc.gif)\n",
@@ -655,7 +672,7 @@
655672
],
656673
"metadata": {
657674
"kernelspec": {
658-
"display_name": "Python 3",
675+
"display_name": "Python 3 (ipykernel)",
659676
"language": "python",
660677
"name": "python3"
661678
},
@@ -669,10 +686,10 @@
669686
"name": "python",
670687
"nbconvert_exporter": "python",
671688
"pygments_lexer": "ipython3",
672-
"version": "3.7.1"
689+
"version": "3.11.5"
673690
},
674691
"toc-autonumbering": true
675692
},
676693
"nbformat": 4,
677-
"nbformat_minor": 2
678-
}
694+
"nbformat_minor": 4
695+
}

0 commit comments

Comments
 (0)