https://www.tensorflow.org/install/gpu
https://www.anaconda.com/products/individual
conda create -n tf2 python=3.6.5
conda 换国内的镜像源
conda install tensorflow-gpu
#会自动安装cuda10.1,cudnn7.6.5等依赖哦,缺点是只能在此虚拟环境下使用
#或者pip,lunix系统实测有效
pip install tensorflow-gpu==2.3.0
conda install tensorflow-estimator==2.1.0
import tensorflow as tf
tf.__version__
至此tf-gpu安装完毕,是不是觉得太简单了?
缺点有下:
该方法只适合特定环境和特定tf版本gpu,有很多版本或者用pip安装时是只安装tensorflow-gpu而不会安装cuda,cudann等依赖的
。。。
下面尝试一般方法:
https://developer.nvidia.com/cuda-toolkit-archive
cuda安装教程+cudnn安装教程—Hello_World_admin
此文很详细了,感谢开源!