首页 > 技术文章 > win10搭建tensorflow环境

caesar-the-great 2020-04-10 15:15 原文

ref: https://segmentfault.com/a/1190000018362783

ref: https://blog.csdn.net/u010099080/article/details/53418159

1 安装python(3.7) + pychrom

2 安装tensorflow-gpu (version 1.14.0)

PS: win下先配置pip的源(解决pip下载太慢的问题):  https://blog.csdn.net/lht_521/article/details/81914400

  TensorFlow 有两个版本:CPU 版本和 GPU 版本。GPU 版本需要 CUDA 和 cuDNN 的支持,CPU 版本不需要。

3 安装CUDA (Version 10.0.130) - 需要FQ下载

4 安装CUDNN (cudnn 7.6.0 for cuda 10.0)  - 需要FQ下载

请注意: python & CUDA & CUDNN & tensorflow的版本都是一一匹配的,不能随便乱装

 

 官网:https://tensorflow.google.cn/install/source_windows

PS: 上面的东西都装完后,写一个demo想测试一下tensorflow,但一直总是提示:No module named 'tensorflow'

试着install uninstall了几次都不行
pip3 install tensorflow-gpu==1.14.0
pip3 uninstall tensorflow-gpu==1.14.0
以上都没有解决问题,最后在pychorm中的project interpreter中搜索并安装了tensorflow-gpu,解决了问题

PS: (实在不行就安装anocoda,别用pip了)

 

推荐阅读