捅咕一下午,终于
anaconda 虚拟环境里安装
conda create --name tensorflow1.15 python=3.6
activate tensorflow1.15
conda install -c anaconda cudatoolkit
conda install -c anaconda cudnn
conda install -c aaronzs tensorflow-gpu==1.15
测试:
import tensorflow as tf
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "0"
print(tf.test.is_gpu_available())
结果: