Windows安装TensorFlow 方法

来源:互联网 发布:数控编程指令大全 编辑:程序博客网 时间:2024/04/28 13:28

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

>>>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
0 0
原创粉丝点击