[win/ubuntu]创建conda环境,安装/删除jupyter Kernel

1. 创建一个conda环境 (将`[环境名字]`换成你想要的名字,python是3.6版本,可以换成3.8等等)

conda create -n [环境名字] python=3.6

2. 激活新建的环境

conda activate [环境名字]

3. 安装ipykernel (`[kernel名字]` 改成你想要的kernel名字,它会显示在jupyter中)

python -m ipykernel install --name [kernel名字] --user

在Ubuntu中可能会出现 [Errno 13] Permission denied:'/usr/local/share/jupyter的错误

加上  --user 可以解决 

4. 查看当前环境中的kernel

jupyter kernelspec list

5. 删除kernel

jupyter kernelspec remove [kernel名字]

6*. 删除创建的conda虚拟环境

conda remove -n [环境名字] --all

你可能感兴趣的:(安装,python,conda,jupyter,python)