Ubuntu 16.04 LTS安装TensorFlow(Anaconda 4.3.1)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/superman_xxx/article/details/71512395

Installing TensorFlow on Ubuntu【官方链接】
安装anconda的命令是:bash+空格+包名 等待安装完毕即可,这里的包是下载下来的离线包
Anaconda下载链接
这里写图片描述

Ubuntu 16.04 LTS操作系统镜像下载
这里写图片描述
Ubuntu 16.04 LTS镜像下载链接

【Ubuntu和Anconda安装好之后执行以下操作】

— 更换anconda源(国外经常被墙的,换为清华镜像站)

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --set show_channel_urls yes  

— 创建环境(linux的tensorflow需要python3.6)

conda create -n tensorflow python=3.6.0  

— 进入环境

source activate tensorflow 

— 安装tensorflow

pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-cp36-cp36m-linux_x86_64.whl  

— 检验安装是否成功

python  
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))

猜你喜欢

转载自blog.csdn.net/superman_xxx/article/details/71512395