Ubuntu(Vmplayer 上の GuestOS) に Tensorflowを入れてみる。

$ uname -a
Linux ubuntu 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$


# $ python —version
Python 2.7.6

# virtualenv による環境準備

$ pip install virtualenv  ←  エラーになった
Could not find any downloads that satisfy the requirement vertualenv

$sudo apt-get install python-virtualenv

$ mkdir ~/tensorflow
$ virtualenv -—system-site-packages ~/tensorflow
$ cd ~/tensorflow
$ source bin/activate

# TensorFlowのインストール
(tensorflow)$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

# お約束の Hello world! を
(tensorflow)$ 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(5)
>>> b=tf.constant(17)
>>> print sess.run(a+b)
22
>>>