Linux Mint 17.3 Rosa: TensorFlow setup (Ubuntu/Linux 64-bit, CPU only)
Python のバージョン確認
[]$ python -V Python 2.7.6
Install pip
$ dpkg -l | grep python-dev ii libpython-dev:amd64 2.7.5-5ubuntu3 amd64 header files and a static library for Python (default) ii python-dev 2.7.5-5ubuntu3 amd64 header files and a static library for Python (default) []$ dpkg -l | grep python-pip ii python-pip 1.5.4-1ubuntu3 all alternative Python package installer ii python-pip-whl 1.5.4-1ubuntu3 all alternative Python package installer []$
Install TensorFlow (Ubuntu/Linux 64-bit, CPU only)
[]$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl : : Successfully installed tensorflow protobuf wheel numpy setuptools Cleaning up... []$
Run TensorFlow from the Command Line
[]$ python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow as tf >>> hello = tf.constant('Hello, TensorFlow!') >>> sess = tf.Session() >>> print(sess.run(hello)) Hello, TensorFlow! >>> a = tf.constant(11) >>> b = tf.constant(43) >>> print(sess.run(a + b)) 54 >>> exit() []$
参考