The release of TensorFlow itself is based on Ubuntu, so it's more convenient under Ubuntu than under Windows. There are three kinds of installation methods, see TensorFlow the second chapter of the construction of the environment. This article describes using PIP to install CPU-based TensorFlow.
1, download install pip:$ sudo apt-get install Python-pip Python-dev
2, install TensorFlow
$ sudo pip install--upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_ X86_64.whl
An error occurred during installation:
1:sslerror:hostname ' storage.googleapis.com ' Dosen ' t match ' www.google.com '
Workaround: Open the link address, download the software and place it in the home directory, or download it with W-get. Then replace the above instruction link address with the name of the downloaded file.
2:oserror:[error13]permission deneied: ...
I forgot to add sudo when I installed it.
3,sslerror:the read operation time Out
Change command to: Pip--default-timeout=100 install #####
Test:
Import TensorFlow as tf
>>> hello = tf.constant (' Hello, tensorflow! ')
>>> sess = tf. Session ()
>>> sess.run (hello)
Hello, tensorflow!
>>> a = Tf.constant (ten)
>>> B = tf.constant (+)
>>> sess.run (a+b)
42