How to Install TensorFlow GPU on Windows - FULL TUTORIAL
Why Stack Overflow recommends it
Stack Overflow users link it when answering or asking about getting tensorflow-gpu, CUDA and cuDNN working on Windows.
Recommended by 2 people across 2 different months, 2019 to 2023.
What it is
A step-by-step screen tutorial by Tech With Tim on installing the GPU build of TensorFlow for Python on Windows 8 or 10. It covers removing old NVIDIA software, installing Visual Studio 2017, CUDA, cuDNN, environment variable edits and Anaconda.
What people said
Recommends Saad · 2020-05 · Stack Overflow · on “can't install tensorflow library”
Installing Tensorflow directly is not a good practice, I would recommend installing TensorFlow in an environment like conda [LINK] . Maybe watch this video [this video] .
Recommends Raghav Gupta · 2020-11 · Stack Overflow · on “How do I set up a GPU with CUDA in python for TensorFlow on Windows 10?”
You need to install tensorflow-gpu. Follow this [this video] and make changes according to your system specifications
Cites Gabriel Borges · 2019-03 · Stack Overflow · on “TensorFlow GPU doesn't work, How to install it?”
I started learning about the tensorflow recently and decided to switch to the GPU version, because it is much faster, but I can not import it, it always gives the same error. I already tried: Installing it by pip, in python 3.6.8, cuda 10 and the most recent cuDNN for cuda 10 I tried reinstalling python, CUDA and cuDNN Tried installing Visual Studio and installed CUDA 9 and cuDnn I tried installing the latest Anaconda, created a "default" env and another in python 3.6 (also tried in 3.5), pip install tensorflow-gpu in both cases my last attempt was to follow a tutorial on youtube, I did exactly as demonstrated ( [this video] ) Everything i tried returned the same error. Traceback: [LINK] The comp
Cites Balraj Ashwath · 2020-01 · Stack Overflow · on “Tensorflow-gpu only trains custom object detection models using version 1.14”
If you need to run tensorflow-gpu on Windows, Microsoft Visual Studio [LINK] is a pre-requisite. This requirement is also mentioned here [LINK] . You can download the community version of Visual Studio 2019 here [LINK] . Though this requirement is not directly mentioned in tensorflow-gpu installation docs [LINK] , it is a part of CUDA installation guide for Windows [LINK] . Also you need to ensure you have a NVIDIA GPU card with CUDA Compute Capability 3.5 or higher . You can check if your GPU meets the Compute Capability requirement here [LINK] . Here are a few resources to help with tf-gpu installation: [LINK] [this video]
Cites Lenin Khangjrakpam · 2023-08 · Stack Overflow · on “Tensorflow import error: ModuleNotFoundError: No module named 'tensorflow.python'”
I am installing tensorflow (Window 11), for first time by following this sites help: [LINK] [this video] [LINK] I am already installed Microsoft Visual C++ Redistributable [LINK] , CUDA 11.8.0 , cuDNN SDK 8.6.0 Execute the following command using Anaconda Prompt Terminal conda create --name tf python=3.9 pip install --upgrade pip pip install "tensorflow<2.11" Then, when I do this: import tensorflow as tf The following error are show: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\ASUS\AppData\Roaming\Python\Python39\site-packages\tensorflow\__init__.py", line 38, in <module> from tensorflow.python.tools import module_util as _module_util ModuleNotFoundError: