TensorFlow
cudart64_90.dll
Path variable
DLL error
installation issue
Tensorflow can't find cudart64_90.dll even though it is installed with Path variable set
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Once TensorFlow is installed on a Windows machine with CUDA support, you might encounter an error message stating that TensorFlow cannot find "cudart64_90.dll", even when it's evident that the file exists and the Path variable is correctly set. This issue can frustrate developers intending to leverage GPU acceleration to expedite their machine learning tasks. In this article, we'll delve into why this issue might occur and how to rectify it.
Understanding the Components
Before diving into the problem and its solution, let's first understand the key components involved:
- TensorFlow: A popular open-source library for numerical computation, often used for machine learning tasks. TensorFlow can run on CPU and GPU, with the latter delivering significant performance improvements.
- CUDA: The compute platform and programming model by NVIDIA, allowing software to use the GPU for general-purpose processing. CUDA is crucial for enabling TensorFlow to operate efficiently on GPUs.
- cuDNN: The CUDA Deep Neural Network library. This NVIDIA library accelerates deep learning frameworks, and TensorFlow uses it when present.
- DLL Files: Dynamic Link Libraries essential for running applications on Windows, providing resources such as functions and variables.
The Issue: Missing "cudart64_90.dll"
When attempting to run a TensorFlow application, Windows might produce an error stating:
- Version Incompatibilities: The version of TensorFlow installed might not be compatible with the specific CUDA version you have. TensorFlow, CUDA, and cuDNN versions must align to ensure interoperability.
- Directory Permissions: Windows' permission settings might block TensorFlow from accessing the directory where the DLL resides.
- Environment Variables: Misconfigurations or typographical errors in environment variable paths might hinder Windows from locating the necessary DLLs even if the Path appears correct.
- System Path Limitations: Windows has a character limit for the system Path variable, and an overly long Path can result in important entries being ignored.
- Corrupted Installation: Occasionally, the CUDA toolkit or cuDNN files might not install correctly, leading to missing or corrupt DLL files.
- Ensure your TensorFlow, CUDA, and cuDNN versions are compatible. Refer to the TensorFlow documentation to confirm supported versions.
- Example: TensorFlow 1.12.0 might require CUDA 9.0 and cuDNN 7.4.
- Navigate to
Control Panel->System and Security->System->Advanced system settingsand clickEnvironment Variables. - Ensure the Path includes:
- The CUDA directory: e.g.,
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin - The location of cuDNN DLLs if separate from the CUDA path
- Make corrections if there are typographical errors or misconfigured paths.
- Ensure TensorFlow (or Python executable) has the necessary permissions to access the directory containing the DLL.
- Run your command line or IDE as Administrator if permission issues persist.
- Consolidate paths or remove redundant entries to ensure critical paths are not ignored due to exceeding the character limit.
- If the problem persists, attempt a clean reinstallation of both CUDA and cuDNN. Make sure that all components are copied over successfully and without corruption.
- Always install the latest patches and updates for all related software to ensure security and performance improvements.
- Consider using virtual environments with Python (using
condaorvenv) to minimize conflicts between different library versions. - Regularly back up your configurations to quickly revert in case of incorrect modifications.

