Deployment and installation of Mac OS in TensorFlow
TensorFlow released version 0.8 with distributed attributes on June 13,. it is likely to become another project that changes the internet landscape after Mapreduce. I have been studying TensorFlow-related things at home this weekend and have deployed and installed TensorFlow in Mac OS X.
The installation method is very simple. refer to the following Tensor Flow installation tutorial.
$ Sudo easy_install pip
$ Sudo easy_install -- upgrade six
$ Sudo pip install -- upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0rc0-py2-none-any.whl </a>
After the installation is complete, you can run its test case
$ 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
>>>
Note that there is an error about numpy when preparing to run MNIST in Mac OS,
Module compiled against API version 0xa but this version of numpy is 0x9
The main cause of this error is that the numpy version is too old. The solution is to install opencv through homebrew.
Brew install python
Brew tap homebrew/science
Brew install opencv
This article permanently updates the link address: