1.打开conda 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
2.创建环境
新建环境:conda create -n tensorflow-gpu python3.7
激活环境:activate tensorflow-gpu
安装tensorflow-gpu版本:conda install tensorflow-gpu指定版本
3.验证:在命令行中输入:python
import tensorflow as tf
print(tf.test.is_gpu_available())
返回True 则表示成功
以上过程亲测无需手动下载CUDA以及cudnn,conda自动安装。