来源:(http://www.cnblogs.com/carol-wei/p/7775897.html)
1. 安装python3.6
官网下载python3.6 for MAC,安装
2. 下载安装虚拟环境virtualenv
<pre style="margin: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">sudo pip3 install --upgrade virtualenv </pre>
3. 生成tensorflow的虚拟环境
<pre style="margin: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">virtualenv --system-site-packages -p python3 ~/tensorflow</pre>
4.激活虚拟环境
<pre style="margin: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">source ~/tensorflow/bin/activate</pre>
5.安装tensorflow包
<pre style="margin: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">pip3 install --upgrade tensorflow #此处确保pip 版本>=8.1
上面这个命令通常会出错,那么直接指定包,用如下命令</pre>
<pre style="margin: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">*pip3 install --upgrade *https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.3.0-py3-none-any.whl
总结: 还是要看官网说明,清楚透彻</pre>