win7安装tensorflow-gpu版(Anaconda)

参考文章:http://blog.csdn.net/sb19931201/article/details/53648615


自己的台式机装了影驰1050ti大将显卡,平时也不怎么玩游戏,干脆把TensorFlow-GPU版给装上试试。

本来想装docker版本,http://blog.csdn.net/ixuhangyi/article/details/52291716,但是据说docker对GPU的支持有限,且对本地开发环境的支持也不够友好,因此直接用pip安装的方式

官方指导:https://www.tensorflow.org/install/install_windows

最重要的就是满足下面的先决条件:注意版本都要对应,cuDNN v6.0亲测不行,必须要v5.1,此处安装过程请参考本文开头参考文章中win10的安装

Requirements to run TensorFlow with GPU support

If you are installing TensorFlow with GPU support using one of the mechanisms described in this guide, then the following NVIDIA software must be installed on your system:

  • CUDA® Toolkit 8.0. For details, see NVIDIA's documentation Ensure that you append the relevant Cuda pathnames to the %PATH% environment variable as described in the NVIDIA documentation.
  • The NVIDIA drivers associated with CUDA Toolkit 8.0.
  • cuDNN v5.1. For details, see NVIDIA's documentation. Note that cuDNN is typically installed in a different location from the other CUDA DLLs. Ensure that you add the directory where you installed the cuDNN DLL to your %PATH%environment variable.
  • GPU card with CUDA Compute Capability 3.0 or higher. See NVIDIA documentation for a list of supported GPU cards.

If you have an earlier version of the preceding packages, please upgrade to the specified versions.


遇到的坑:之前安装了visual c++2017的库,但是TensorFlow需要visual c++2015,卸载掉(x86 x64的visual c++2017都要卸载),重新安装2015,都弄完了最好重启下电脑


准备好前提条件后:打开命令行:创建一个Python3.5的环境tensor_flow ,因为TensorFlow只支持Python3.5

conda create -n tensor_flow python=3.5

激活环境:activate tensor_flow

pip安装TensorFlow:pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.1.0-cp35-cp35m-win_amd64.whl 

安装完成,进入Python交互命令行,运行测试样例,运行成功

win7安装tensorflow-gpu版(Anaconda)_第1张图片

          win7安装tensorflow-gpu版(Anaconda)_第2张图片
    

你可能感兴趣的:(python,机器学习)