I'm trying to install tensorflow which supports GPU.
I tried the information in the following link
https://www.tensorflow.org/install/install_windows
Then used pip3 install --upgrade tensorflow-gpu
to install tensorflow.
But I'm getting the following error when trying to import tensorflow.
Traceback (most recent call last):
File "C:\Research\Python_installation\lib\site-packages\tensorflow\python\platform\self_check.py", line 75, in preload_check
ctypes.WinDLL(build_info.cudart_dll_name)
File "C:\Research\Python_installation\lib\ctypes\__init__.py", line 347, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
import tensorflow as tf
File "C:\Research\Python_installation\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import *
File "C:\Research\Python_installation\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Research\Python_installation\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in <module>
self_check.preload_check()
File "C:\Research\Python_installation\lib\site-packages\tensorflow\python\platform\self_check.py", line 82, in preload_check
% (build_info.cudart_dll_name, build_info.cuda_version_number))
ImportError: Could not find 'cudart64_90.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL: https://developer.nvidia.com/cuda-toolkit
Can someone please advice me on how to use this.
The Python "ModuleNotFoundError: No module named 'tensorflow'" occurs when we forget to install the tensorflow module before importing it or install it in an incorrect environment. To solve the error, install the module by running the pip install tensorflow command.
Inside the notebook, you can import TensorFlow in Jupyter Notebook with the tf alias.
I had a similar problem, and had to be very careful about the version of CUDA, and the version of CuDNN. I hit the exact error you are hitting, and fixed it by going through what I documented here: http://www.laurencemoroney.com/installing-tensorflow-with-gpu-on-windows-10/
Give it a try! :)
(The most common failure I've found is that you download the latest CUDA, and not the matching CUDA. Right now CUDA is at 9.1, but TF requires 9.0 -- your error says cudart90.dll) -- so find the 9.0 drivers, download and install them. Then run TensorFlow. It might then fail on the CuDNN drivers, which is good, becuase you know CUDA is right. Then download the right CuDNN drivers (matching the version # in the error) and try again.)
Please download the proper drivers as latest version of cuda v8.0 toolkit needs tensorflow 1.4.x needs.
As, by default pip3 install --upgrade tensorflow-gpu
install latest version of tensorflow which needs cuda v9.0 (latest) not cuda v8.0 toolkit
You'll need to install the version 1.4.1 for CUDA-8 as
pip install tensorflow-gpu==1.4.1
The latest (version 1.5) is for CUDA-9 You'll need to install the version 1.5 for CUDA-9 as
pip install tensorflow-gpu==1.5
Download cuddn for your appropriate cuda version toolkit from here and follow this.
Download appropriate cuda toolkit from here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With