以下安装过程不涉及网络加速工具
Ubuntu完整安装过程
安装python
$ sudo apt-get install python
$ sudo apt-get install python-pip python-numpy python-dev
pip安装tensorflow
# 仅cpu版本
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.1-cp27-none-linux_x86_64.whl
# 开启GPU支持的版本
$ sudo pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-1.0.1-cp27-none-linux_x86_64.whl
Windows 完整安装过程
安装python
安装tensorflow
# cpu版本
pip install https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl
# GPU版本
pip install https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.1-cp35-cp35m-win_amd64.whl
测试TensorFlow
$ python
>>> import tensorflow as tf
>>> hello = tf.constant('Hello,TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello,TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a + b))
42
>>> exit()
$