Jupyter Notebook 环境搭建与使用指南

Jupyter Notebook 环境搭建与使用指南
1. 创建 Conda 环境首先创建一个名为jupyter的 Conda 环境指定 Python 版本为 3.11conda create-njupyterpython3.11输入y并回车确认安装依赖包。出现以下界面表示环境创建成功2. 安装 Jupyter Notebook/Lab在创建的环境基础上执行以下命令安装 Jupytercondainstall--channelconda-forge jupyterlab jupyter3. 启动与使用 Jupyter激活环境并启动 Jupyterconda activate jupyter# 进入环境jupyter notebook# 或使用 jupyter lab学习资源推荐视频教程B站 Jupyter 使用教程常用快捷键Esc退出编辑模式Enter进入编辑模式M将单元格转为 MarkdownL显示/隐藏行号Ctrl配合其他键使用进阶提示后续可以安装环境管理插件来添加内核方便在不同 Python 环境间切换。