Install miniconda
与Anaconda相比,Miniconda要轻量化得多。Miniconda仅包含conda,Python以及少量的依赖包。miniconda的安装方法见官网说明文档。只需要下载对应操作系统的installer,然后按提示一步步进行即可。
Install jupyter notebook
1 | pip install notebook |
Create conda environment
1 | conda create -n dl_env |
Add conda environment to jupyter notebook
添加前
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18# list现有的kernel
(base) root@kaka:~/tmp/envs# jupyter kernelspec list
Available kernels:
python3 /root/miniconda3/share/jupyter/kernels/python3
# 查看具体的kernel信息
(base) root@kaka:~/tmp/envs# cat /root/miniconda3/share/jupyter/kernels/python3/kernel.json
{
"argv": [
"python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "base_py3",
"language": "python"
}