In this article, we will show you how to install TensorFlow with the native NVIDIA GPU/CUDA acceleration on Windows 10/11 operating systems.
Topic of Contents:
- Installing the NVIDIA GPU Drivers on Windows 10/11
- Installing NVIDIA CUDA and CuDNN on Windows 10/11
- Installing Python on Windows 10/11
- Installing TensorFlow on Windows 10/11
- Checking If TensorFlow Is Installed Correctly on Windows 10/11
- Checking If TensorFlow Can Use the GPU/CUDA Acceleration on Windows 10/11
- Checking If TensorFlow Can Use the NVIDIA CuDNN Library on Windows 10/11
- Conclusion
Installing the NVIDIA GPU Drivers on Windows 10/11
For the TensorFlow native NVIDIA GPU/CUDA acceleration to work on Windows 10/11, you must have an NVIDIA GPU installed on your computer and install the NVIDIA GPU driver on Windows 10/11. If you have an NVIDIA GPU installed on your computer and you need any assistance in installing the NVIDIA GPU driver on Windows 10/11, read this article.
Installing NVIDIA CUDA and cuDNN on Windows 10/11
Once you installed the NVIDIA GPU drivers on your Windows 10/11 system, you have to install NVIDIA CUDA and NVIDIA cuDNN for the TensorFlow native NVIDIA GPU/CUDA acceleration to work.
If you need any assistance in installing NVIDIA CUDA on your Windows 10/11 operating system, read this article.
If you need any assistance in installing NVIDIA cuDNN on your Windows 10/11 operating system, read this article.
Installing Python on Windows 10/11
TensorFlow 2.10 requires Python 3.10 to work. If you have the newer versions of Python (newer than Python 3.10) installed on your Windows 10/11 system, you must uninstall it and install Python 3.10 for TensorFlow 2.10 to work.
If you need any assistance in uninstalling Python from Windows 10/11 to install Python 3.10, read this article.
If you need any assistance in downloading and installing Python 3.10 on Windows 10/11, read this article.
You can also install TensorFlow 2.10 if you’re using Anaconda Python and get the native NVIDIA GPU/CUDA acceleration to work. In that case, you have to create an Anaconda Python 3.10 virtual environment. To learn how to create an Anaconda Python 3.10 virtual environment, read this article.
If you don’t have the Anaconda Python installed on your Windows 10/11 system and you would like to install it, read this article.
Installing TensorFlow on Windows 10/11
Before you install TensorFlow on Windows, open a Terminal and check if you’re using Python 3.10.x and you have access to Python PIP.
$ pip --version
If you’re using Python 3.10.x and you have access to the Python PIP package manager, install TensorFlow 2.10.1 with the following command:
TensorFlow 2.10.1 is being installed. It takes a while to complete.
At this point, TensorFlow 2.10.1 should be installed.
Checking If TensorFlow Is Installed Correctly on Windows 10/11
Once TensorFlow 2.10.1 is installed, run the following command to check whether you can access it on your Windows 10/11 operating system:
If TensorFlow 2.10.1 is installed correctly and you can access it, the previous command should print the TensorFlow version number 2.10.1 as you can see in the following screenshot:
Checking If TensorFlow Can Use the GPU/CUDA Acceleration on Windows 10/11
To learn how to check whether TensorFlow can use the GPU/CUDA acceleration natively on your Windows 10/11 operating system, read this article.
Checking If TensorFlow Can Use the NVIDIA CuDNN Library on Windows 10/11
To learn how to check whether TensorFlow can use the NVIDIA cuDNN library on your Windows 10/11 system, read this article.
Conclusion
The TensorFlow version that is newer than 2.10.1 dropped its support for the native NVIDIA GPU/CUDA acceleration for Windows operating systems. So, to get the native NVIDIA GPU/CUDA acceleration support on Windows, you must install the TensorFlow version 2.10.1 which also requires the Python version 3.10.x to work. In this article, we showed you how to install TensorFlow 2.10.1 on Windows 10/11 operating systems so that TensorFlow can use the NVIDIA GPU/CUDA acceleration natively to speed up the AI/ML training.