[Conda] 安装Jupyter notebook

1. 安装了Conda

Ubuntu/Debian 安装教程

2.1 创建虚拟环境(建议)

为了做环境隔离, 建议使用不同的虚拟环境来管理

conda create -n vm_jupyter python=3.12 -y

进入虚拟环境

conda activate vm_jupyter

安装Jupyter lab 和 notebook

conda install -y jupyterlab notebook

(可选)安装其他常用的库

conda install -y pandas matplotlib conda-forge::scikit-optimize

启动notebook

jupyter notebook --allow-root

点击任意一个链接, 打开Jupyter Notebook

如果想用其他电脑访问这个Notebook, 则要进行配置

Ctrl+C 关闭Notebook, 输入以下指令生成配置文件

jupyter notebook --generate-config

编辑这个配置文件

sudo nano /root/.jupyter/jupyter_notebook_config.py

填入以下内容并Ctrl+O保存

c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.allow_remote_access = True
c.NotebookApp.port = 8888

再次打开Notebook

jupyter notebook --allow-root

把他给出的连接的IP换成Ubuntu的IP地址, 已经可以访问了


[Conda] 安装Jupyter notebook
https://blog.onanii0721.website//archives/condajupyteris
作者
Gzcheng
发布于
2024年09月20日
更新于
2025年01月22日
许可协议