Install Python+cuda+cudnn+tensorflow on WINDOW10

Source: Internet
Author: User
Tags cuda toolkit

Software

Version

Window10

X64

Python

3.6.4 (64-bit)

CUDA

CUDA Toolkit 9.0 (Sept 2017)

CuDNN

CuDNN v7.0.5 (Dec 5), for CUDA 9.0

The above version of the test passed.

Installation steps:

1. to install python, remember to tick pip.

2. detects if CUDA is supported .

For more information on the NVIDIA website, see: Https://developer.nvidia.com/cuda-gpus, you can see if you can use TensorFlow with GPU support. Before installing and running TensorFlow, you need to install the Cuda driver first.

3. Installing CUDA Drivers

Visit Cuda's Download website: https://developer.nvidia.com/cuda-toolkit, you can see Cuda the latest version is 9.1 version, can be selected by the following "Legacy releases" Link to download the old version of the driver.

It is recommended that you choose a custom installation and then only Cuda. It is recommended to install the default file path.

4. Installing the CuDNN library

CUDNN Library (the NVIDIA CUDA?) Deepin Neural Network library) is a CUDA update package for deep neural networks that TensorFlow uses to accelerate deep learning on Nvidia GPUs. Can be downloaded from here, see: Https://developer.nvidia.com/cudnn.

To register an NVIDIA developer account first, it is free. After logging in, you will see various CUDNN downloads. This article downloads the Cuda 9.0, so it is determined that Cuda 9.0 has the Cudnn v7.0.5 selected.

The download is a ZIP file containing several folders, each containing a CUDNN file (a DLL, a header file, and a library file). Find your Cuda installation directory, here's what it should look like:

C:\Program Files\nvidia GPU Computing toolkit\cuda\v9.0

You can see the directory from the zip file also in this directory, that is, there is a bin, an include, a lib and so on. Copy the files from the zip to the relevant directory.

For example, drag the Cudnn64_7.dll file to the C:\Program files\nvidia GPU Computing toolkit\cuda\v9.0\bin directory, other similar.

5. Installing tensorflow

Install the nightly build version of TensorFlow. To install it from the command prompt, just enter: Pip install Tf-nightly-gpu

(The standard version of TensorFlow can also be installed.) Input: Pip install Tensorflow-gpu)

Once the installation is complete, enter in the command Prompt window: python

Open the Python editor, where you enter: Import TensorFlow

If the Cuda driver has an error, the Cudart64_xx.dll failure may be displayed, where XX is the version number.

If the Cuda driver is correct, but the CUDNN driver has an error, it may be shown that Cudnn64_x.dll is missing something, where X is a version number.

Install Python+cuda+cudnn+tensorflow on WINDOW10

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.