linux配置notebook
Linux 配置 Jupyter Notebook
想用 notebook 记录一下学习 csapp 的过程, 顺带配了一下 C 内核
1. 安装和配置
安装 Jupyter Notebook:
- 使用 pip:
1
2
3python3 -m venv notebook
source notebook/bin/activate
pip install notebook
- 使用 pip:
启动 Jupyter Notebook:
1
jupyter notebook
设置密码:
1
jupyter server password # 输入你的密码
2. 安装 Rust 内核
- 使用
evcxr_jupyter
:1
2cargo install evcxr_jupyter
evcxr_jupyter --install - 启动 Jupyter Notebook 后,选择 Rust 内核创建新的 Notebook。
3. 安装 C 内核
安装 jupyter-c-kernel:
1
pip install jupyter-c-kernel
安装 C 内核:
1
install_c_kernel --user
4. 查看内核
- 查看已安装的内核:
1
jupyter kernelspec list
5. 其他功能
切换单元格类型:
- 在单元格时按
esc
,再按M
切换为 Markdown 单元格,按Y
切换回代码单元格。
- 在单元格时按
设置中文界面:
- 安装中文语言包:
1
pip install jupyterlab-language-pack-zh-CN
- 在 Jupyter Notebook 中设置语言为中文。
- 安装中文语言包:
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.