來(lái)源:(http://www.cnblogs.com/carol-wei/p/7775897.html)
1. 安裝python3.6
官網(wǎng)下載python3.6 for MAC择诈,安裝
2. 下載安裝虛擬環(huán)境virtualenv
<pre style="margin: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">sudo pip3 install --upgrade virtualenv </pre>
3. 生成tensorflow的虛擬環(huán)境
<pre style="margin: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word;">virtualenv --system-site-packages -p python3 ~/tensorflow</pre>
4.激活虛擬環(huán)境
<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
上面這個(gè)命令通常會(huì)出錯(cuò),那么直接指定包秕噪,用如下命令</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
總結(jié): 還是要看官網(wǎng)說(shuō)明胖翰,清楚透徹</pre>