安装jupyter kernel
安装jupyter kernel
安装 ipykernel
在我们安装好 jupyter notebook 后如果没有检测到 conda create 命令大概率是因为没有安装 jupyter 内核 —— ipykernel。
假设我们已经安装好环境,并且已经安装好 jupyter notebook
1 2 3
conda create -n <env-name> python # 安装一个带有 python 的环境 conda activate <env-name> # 激活创建的环境 conda install -c conda-forge notebook # 通过 conda-forge 通道创建 jupyter
开始安装 ipykernel
1 2
conda install ipykernel # 安装 ipykernel python -m ipykernel install --user --name <env-name> --display-name <kernel-name> # 添加内核到环境中
安装完毕后,启动 jupyter notebook
1
jupyter notebook
对于使用 scoop 安装 miniconda 的补充
如果我们在 Windows 平台,使用 scoop 安装的 miniconda,那么有如下几点需要注意:
conda.exe位于current/Scripts目录下,我们在 IDE 工具中会用到- 安装完成之后,需要打开 powershell 输入
conda init初始化 conda,然后关闭 powershell 再重新打开,使 conda 命令生效
This post is licensed under CC BY 4.0 by the author.