一. 安装tensorflow
step1. 安装anaconda3
step2. 创建并激活虚拟环境
conda create -n tf2py36 python=3.6
conda activate tf2py36
step3. 安装tensorflow
pip3 install tensorflow==2.3.1 -i https://mirrors.aliyun.com/pypi/simple/
二. 终端启动jputer notebook
1. 安装ipykernel
pip3 install ipykernel -i https://mirrors.aliyun.com/pypi/simple/
2. 将新创建的虚拟环境添加到 Jupyter notebook 中
# python -m ipykernel install --user --name 虚拟环境名 --display-name 在jupyter中要显示的名
python -m ipykernel install --name tf2py36
3. 终端启动jupyter notebook
jupyter notebook
4. 选择指定的虚拟环境新建notebook脚本
三. jupyterbook删除指定解释器
# jupyter kernelspec remove 环境名
jupyter kernelspec tf2py36