一、环境概述
-
- 系统环境:ubuntu 14.04 4cores+8gmemory
- 语言环境:python 2.7.6 python-dev python-pip
二、前期准备
-
安装python:
这里不做赘述,因为一般linux操作系统都默认安装了python。安装python-dev python-pip
sudo apt-get install python-dev python-pip
如果提示找不到包,熟悉linux的兄弟们都知道啦:
sudo apt-get update
然后再重新安装。
三、安装tensorflow
-
pip install
sudo pip install --upgrade
https://storage.googleapis.com/tensorflow/linux
/cpu/tensorflow-1.0.0-cp27-none-linux_x86_64.whl测试安装
启动python解释器。
import tensorflow as tf
a=tf.constant(10)
b=tf.constatn(20)
sess=tf.Session()
print(sess.run(a*b))