Install Tensorflow on Macbook
for macOS Sierra 10.12.6
Using Sublime Text for Python 2 / 3
terminal type as below:
$ sudo easy_install pip
$ sudo easy_install --upgrade six
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0-py2-none-any.whl
$ sudo pip install --upgrade $TF_BINARY_URL
# if reported "Uninstalling numpy-1.8.0rc1"
# change the demand as below (remember that cancelling the "#" )
# $ sudo -H pip install tensorflow --ignore-installed six
my tensorflow information below:
$ pip show tensorflow
Name: tensorflow
Version: 1.2.1
Summary: TensorFlow helps the tensors flow
Home-page: http://tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
Location: /Library/Python/2.7/site-packages
Requires: bleach, werkzeug, html5lib, markdown, six, backports.weakref, wheel, numpy, mock, protobuf
my protobuf information below:
$ pip show protobuf
Name: protobuf
Version: 3.3.0
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: protobuf@googlegroups.com
Author-email: protobuf@googlegroups.com
License: 3-Clause BSD License
Location: /Library/Python/2.7/site-packages
Requires: six, setuptools
my six information below:
$ pip show six
Name: six
Version: 1.10.0
Summary: Python 2 and 3 compatibility utilities
Home-page: http://pypi.python.org/pypi/six/
Author: Benjamin Peterson
Author-email: benjamin@python.org
License: MIT
Location: /Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg
Requires:
my python information below:
$ python
Python 2.7.10 (default, Feb 7 2017, 00:08:15)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
or somebody uses python 3.X, it may be shown that:
$ python3
Python 3.6.0a4 (v3.6.0a4:017cf260936b, Aug 15 2016, 13:38:16)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
Now, type that import tensorflow as tf
.
Solved that ImportError: No module named 'tensorflow'
USE TENSORFLOW HAPPILY : )