安装tensorflow-gpu+cudnn+cuda

1:先安装anaconda(4.2.0版本对应python3.5)

https://repo.anaconda.com/archive/ 

 

2: https://tensorflow.google.cn/install/pip

在这个网页上按照介绍,在一个虚拟环境中安装tf

安装tensorflow-gpu+cudnn+cuda_第1张图片

不过不用执行那么多

conda create -n tensorflow pip python=3.5
source activate tensorflow

本来是 pip install tensorflow-gpu==1.13.1,但是速度太慢,就按照这个网页上分享的

手动把这个下载下来

pip install tensorflow_gpu-1.13.1-cp35-cp35m-linux_x86_64.whl

下载的时候,有遇到错误

(1):settools这个版本太低,又没办法自己升级

pip install --upgrade setuptools

(2): Werkzeug 无法卸载

pip uninstall Werkzeug是不行的,
需要conda remove Werkzeug

接下来再 pip install tensorflow_gpu-1.13.1-cp35-cp35m-linux_x86_64.whl 就可以了

 

3:安装极速器

## 查看系统是否存在NVIDIA驱动
#  lspci | grep -i nvidia
如果没有驱动,还要安装对应显卡的驱动(这一部分略过)

cudnn+cuda 暂时也略

你可能感兴趣的:(深度学习)