Install Tensorflow on Macbook

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 : )

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值