第18月第20天 tensorflow安装

1.

# Mac OS X
$ sudo easy_install pip

# Mac OS X, CPU only:
$ sudo easy_install --upgrade six
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.10.0-py2-none-any.whl

 之前是否brew install python?

ls /usr/local/Cellar/python/

 

ls -al /usr/local/bin/python2.7

 

$ 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(32)
>>> print sess.run(a+b)
42

 

https://tensorflow.google.cn/install/install_windows

http://wiki.jikexueyuan.com/project/tensorflow-zh/get_started/os_setup.html

原文地址:https://www.cnblogs.com/javastart/p/8607065.html