Tensorflow,windows环境安装

来源:互联网 发布:布袋除尘器算法 编辑:程序博客网 时间:2024/05/20 18:51

Google 人工智能学习系统,折腾了好久才安装上,我只能说,没有梯子太累

最后用anaconda 安装的,系统win7 64位

—————————————————————————————————

安装:

1.下载Anaconda 地址:https://www.continuum.io/downloads  下载64位的

https://repo.continuum.io/archive/Anaconda3-4.3.1-Windows-x86_64.exe

2.创建tensorflow空间 (打开 Anaconda Prompt 控制台)

conda create -n tensorflow Python=3.5

3.修改python版本

conda install python=3.5

4.安装tensorflow

conda install –channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge tensorflow

这样差不多就安装好了

—————————————————————————————————

测试:

1.激活

activate tensorflow

2.打开python

python

[html] view plain copy
print?
  1. >>>import tensorflow as tf  
  2. >>>sess = tf.Session()  
  3. >>>a = tf.constant(10)  
  4. >>>b = tf.constant(22)  
  5. >>>print(sess.run(a + b))  
  6. 32  
>>>import tensorflow as tf>>>sess = tf.Session()>>>a = tf.constant(10)>>>b = tf.constant(22)>>>print(sess.run(a + b))32

3.关闭python

exit()

4.关闭tensorflow

deactivate tensorflow



参考资料:

http://blog.csdn.NET/include1224/article/details/53452824

http://blog.csdn.net/jinlong_xu/article/details/53413749

http://blog.csdn.Net/mtj66/article/details/60466931(最后用这个方法安装的)

conda install –channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge tensorflow
conda install –channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge tensorflow