1 下载anaconda
下载地址:https://www.anaconda.com/download/
下载后点击安装即可。
【注意】TensorFlow在Windows仅支持python3.5以上的版本,所以下载Anaconda3
另外,我下载的是Anaconda3-5.0.1-Windows-x86_64.exe
,试了一下Anaconda3-2018.12-Windows-x86_64.exe
好像没有安装成功。
2 打开anaconda prompt
输入如下命令
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
conda create -n tensorflow python=3.6
会提示
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate tensorflow-gpu
#
# To deactivate an active environment, use
#
# $ conda deactivate
然后,输入:
conda activate tensorflow
安装CPU版的TensorFlow:
pip install --upgrade --ignore-installed tensorflow
如果安装很慢的话,直接迅雷下载tensorflow-1.3.0rc0-cp36-cp36m-win_amd64.whl
安装:
pip install --upgrade --ignore-installed tensorflow-1.3.0rc0-cp36-cp36m-win_amd64.whl
tensorflow下载地址https://mirrors.tuna.tsinghua.edu.cn/tensorflow
参考链接:https://blog.csdn.net/qq_33254870/article/details/79001705