需要安装的软件:

1、pip (专门安装python包的工具)

2、tensorflow


一、mac自带了python2.7,python自带了easy_install工具,所以安装pip直接运行命令:



sudo easy_install pip

二、安装TensorFlow:


python2:

$ sudo easy_install --upgrade six
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl

python3:

$ sudo easy_install --upgrade six
$ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py3-none-any.whl
这里说下,我本身也安装了python3.6,然后用python2的方式安装,总是报错:Could not find a version that satisfies the requirement six>=1.10.0 (from tensorflow==0.8.0) (from versions: )
No matching distribution found for six>=1.10.0 (from tensorflow==0.8.0)

后来用python3的方式安装了下,就可以了