1. Install Pip
sudo Install Python-pip Python-dev
2. Installing TensorFlow for Python 2.7
# Ubuntu/linux --bit, CPU only, Python2.7:$ sudoPipInstall--upgrade https://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/LINUX/CPU/TENSORFLOW-0.8.0-CP27-NONE-LINUX_X86_64.WHL# Ubuntu/linux --bit, GPU enabled, Python2.7. Requires CUDA Toolkit7.5and CuDNN v4.# for other versions, see"Install from sources"below.$sudoPipInstall--upgrade https://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/LINUX/GPU/TENSORFLOW-0.8.0-CP27-NONE-LINUX_X86_64.WHL# Mac OS X, CPU only:$sudoEasy_install--Upgrade six$sudoPipInstall--upgrade https://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/MAC/TENSORFLOW-0.8.0-PY2-NONE-ANY.WHL
3. Installing TensorFlow for Python 3.4
# Ubuntu/linux --bit, CPU only, Python3.4:$ sudoPip3Install--upgrade https://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/LINUX/CPU/TENSORFLOW-0.8.0-CP34-CP34M-LINUX_X86_64.WHL# Ubuntu/linux --bit, GPU enabled, Python3.4. Requires CUDA Toolkit7.5and CuDNN v4.# for other versions, see"Install from sources"below.$sudoPip3Install--upgrade https://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/LINUX/GPU/TENSORFLOW-0.8.0-CP34-CP34M-LINUX_X86_64.WHL# Mac OS X, CPU only:$sudoEasy_install--Upgrade six$sudoPip3Install--upgrade https://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/MAC/TENSORFLOW-0.8.0-PY3-NONE-ANY.WHL
Note: If you have previously installed TensorFlow < 0.7.1 versions, you should first use pip uninstall
uninstall TensorFlow and protobuf to ensure that you are getting an installation package with the latest protobuf dependencies.
4. Test whether the installation is successful
$ 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 (+)>>> print (Sess.run (A + b)) >>>
Ubuntu Installation TensorFlow