Windows installation TensorFlow simple and straightforward method (win10+pycharm+tensorflow-gpu1.7+cuda9.1+cudnn7.1)

Source: Internet
Author: User

Install the TENSORFLOW-GPU environment: Python environment, TENSORFLOW-GPU package, CUDA,CUDNN

First, install the PYTHON,PIP3 directly to the official website to download, download and install your favorite version

Https://www. python. org/

Tip: Remember to check the ADD environment variable when you install the last step

In the cmd input PIP3 test PIP3 can use, can not use, manually open the path of the Python installation, locate the PIP3 file, add the path to the environment variable

Second, install Tensorflow-gpu

Installation with PIP3: PIP3 install Tensorflow-gpu

After waiting for the download to complete, you will be prompted to install those packages, prompting the installation to succeed.

  

Three, install CUDA,CUDNN

After installing the TENSORFLOW-GPU, open your installed Pycharm (or the IDE you like)

Enter code for a test

Import= tf.constant ("hell,tf") sess=TF. Session ()print(Sess.run (h))

Run, then there will be error messages, error messages will have Cuda version information, follow the prompts to download the corresponding version is good (the error message has a link).

Download the appropriate CUDNN (https://developer.nvidia.com/rdp/cudnn-download) after installing Cuda

CUDA installation path: C:\Program files\nvidia GPU Computing toolkit\cuda\v9.1

Unzip the downloaded CUDNN file and open the Cuda installation path.

Copy the files in each folder of Cudnn to the folder corresponding to the Cuda folder. Ok

Test the installation successfully in CMD input nvcc-v.

Four, go back to Pycharm, run the program

  

Installation success!!!

Five, currently tensorflow maximum support CUDA9.0 if you want to use CUDA9.1:

The WHL file that Amway Daniel compiled with CUDA9.1 himself.

Https://github.com/fo40225/tensorflow-windows-wheel

It would be nice to find the corresponding version of the download in the project.

Uninstall the previous tensorflow: PIP3 uninstall Tensorflow-gpu

Reinstall: PIP3 Install file name. WHL

Windows installation TensorFlow simple and straightforward method (win10+pycharm+tensorflow-gpu1.7+cuda9.1+cudnn7.1)

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.