55
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

UbuntuにTensorFlowをインストール

パッケージアップデート

$ sudo apt-get update

Pythonのバージョン確認

$ python -V
Python 2.7.9

pipインストール

$ sudo apt-get install python-pip python-dev

TensorFlowインストール

# CPUのみ 今回はこっち
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl

# GPUはこっち
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl

テストで動かしてみる

$ python

>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> sess.run(hello)
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> sess.run(a+b)
42
>>>

うごいた

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
55
Help us understand the problem. What are the problem?