tensorflow 指定版本安装

首先,建议在anaconda中创建虚拟环境,教程已写,参考上一篇

下载之前建议设置pip清华源(用以提速,可百度)

设置下载源    pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

pip install tensorflow-gpu==1.4.0

pip install tensorflow (默认安装cpu版本)

安装完成后,

命令行中,敲击 python,回车

import tensorflow,回车

print(tf.__version__) #打印当前tensorflow版本