Ubuntu 16.04 安装 Anaconda 3 +Tensorflow_GPU
1. 查看配置好的CUDA和cuDNN版本,在我之前博客有提到,CUDA 8.0 和cuDNN 6.0, 查看Tensorflow对应版本:
2. Anaconda3 安装
去清华镜像源https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/下载Anaconda 3-4.2.0版本
命令:
cd Download
bash Anaconda3-4.2.0-Linux-x86_64.sh
修改环境:
cd ~/.bashrc
没有就添加
export PATH="/用户名/anaconda3/bin:$PATH"
source ~/.bashrc
验证:
python
3. 通过Anaconda 安装Tensorflow
创建新的conda环境,**并安装TensorFlow_gpu 1.4.0版本
命令:
conda create -n tensorflow-gpu python=3.5
source activate tensorflow-gpu
pip intall tensorflow-gpu==1.4.0
source deactivate tensorflow-gpu
验证:
import tensorflow as tf