Deployment and installation of Mac OS in TensorFlow

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.