配置jupyter虚拟环境

发现conda建好的环境不能直接被jupyter使用,需要简单配置,特此记录:

1. 确保已经安装好jupyter

终端输入

jupyter notebook

若出现:
配置jupyter虚拟环境_第1张图片
并在浏览器可以打开,说明安装成功。
配置jupyter虚拟环境_第2张图片

2. 新建虚拟环境

conda create -n your_env_name python=X.X(2.7、3.6、3.8等)

3. 与jupyter建立连接

先激活环境:

conda activate your_env_name

然后下载个包:

pip install ipykernel

建立连接:

python -m ipykernel install --user --name your_env_name

查看是否连接成功:

jupyter kernelspec list

在这里插入图片描述

4. 转换jupyter的虚拟环境

kernel->change kernel->选择要更改的环境
配置jupyter虚拟环境_第3张图片

你可能感兴趣的:(软件安装,anaconda,python)