一、下载
Anaconda 安装包也可以到 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 下载
image

image
二、安装Anaconda
Anaconda会提示是否添加到环境变量,选择“是”;(其实不用太看,基本上一直next到底就好了)三、验证
python是否安装,环境配置是否成功Anaconda安装目录下的Script目录cmd打开python 
image
TensorFlow 有两个版本:CPU 版本和 GPU 版本。GPU 版本需要CUDA 和 cuDNN的支持,CPU 版本不需要。如果你要安装 GPU 版本,请先确认你的显卡支持 CUDA。采用pip安装方式,本文安装cpu版本
1.确认版本:pip版本 >= 8.1
2.用 pip -V 查看当前 pip 版本,用 python -m pip install -U pip 升级pip 四、TensorFlow安装(安装的是cpu版本)
cmd cd到Anaconda下的Scripts目录cd Program Files\Anaconda3\Scripts pip install tensorflow CPU版)pip install --upgrade --ignore-installed tensorflowGPU版)pip install --upgrade --ignore-installed tensorflow-gpu五、测试
cmd输入python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))Hello, TensorFlow! a = tf.constant(10)
b = tf.constant(32)
print(sess.run(a + b))六、配置PyCharm(最新激活码)
file—》setting—》
image
TensorFlow 会话.import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
image
七、配置清华源
Anaconda Prompt,输入清华的仓库镜像,更新包更快:conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config –set show_channel_urls yes()