I have a DLL file in the path: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\cudart64_101.dll, but TensorFlow doesn't seem to recognize it:
2020-03-11 14:39:19.815880: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
I made sure that the PATH variable contains the path to the DLL:
>>> l = os.environ['PATH'].split(';')
>>> for s in l:
... print(s)
...
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin
The weird part is that if I include it manually with ctypes it gets loaded successfully:
>>> import ctypes
>>> hllDll = ctypes.WinDLL("C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin\\cudart64_101.dll")
>>> import tensorflow as tf
2020-03-11 15:05:26.907300: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
Why is that? How can I fix it?