打开Anaconda Prompt依次输入以下命令:
- 更改镜像源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --set show_channel_urls yes
- 创建tensorflow环境
conda create -n tensorflow python=3.7.0
- 激活环境
activate tensorflow
- 安装tensorflow
conda install tensorflow
- 安装jupyter notebook
conda install jupyter notebook
注意:
如果打开jupyter notebook出现kernel error,解决办法:输入命令python -m ipykernel install --user
安装jupyter notebook后tensorflow环境不可用,解决办法:输入命令ipython kernelspec install-self --user