# jupyter notebook添加Anaconda虚拟环境的kernel
# 开启虚拟环境
(base) C:Usersjiangshan>activate tensorflow
# 首先向虚拟环境安装ipykernel
(tensorflow) C:Usersjiangshan>conda install -n tensorflow ipykernel
# 进行配置
(tensorflow) C:Usersjiangshan>python -m ipykernel install --user --name tensorflow --display-name "Tensorflow"
Installed kernelspec tensorflow in C:UsersjiangshanAppDataRoamingjupyterkernels ensorflow
# 启动jupyter notebook,然后在"新建"中就会有Tensorflow这个kernel了
(tensorflow) C:Usersjiangshan>jupyter notebook
=============================================================
(base) [jiangshan@localhost ~]$ conda info -e
# conda environments:
#
base * /home/jiangshan/anaconda3
keras /home/jiangshan/anaconda3/envs/keras
tensorflow /home/jiangshan/anaconda3/envs/tensorflow
python -m ipykernel install --user --name tensorflow --display-name "tensorflow"
python -m ipykernel install --user --name keras --display-name "kersa"
python -m ipykernel install --user --name base --display-name "pytorch-python"
==============================================================