1国内源配置
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
2安装Anaconda
安装Anaconda,这里安装的是Anaconda4.3.0版本,Python3.5
3.安装python
conda create --name tensorflow python=3.5
4.激活tensflow的环境:
activate tensorflow
5.检测python版本(注意是你下载的python3.5版本)
python --version
6.下载tensorflow
pip install tensorflow==1.4 -i https://pypi.douban.com/simple
这里用的豆瓣的镜像源,我觉得比清华的快
如果出现:
输入:
python -m pip install --upgrade pip -i https://pypi.douban.com/simple
7.测试
在Anaconda Prompt窗口中输入: python
进入python后依次输入:
import tensorflow as tf
sess = tf.Session()
a = tf.constant(10)
b= tf.constant(12)
sess.run(a+b)
用spyder测试可以看我的另一篇:
spyder测试tensorflow