ImportError: DLL load failed: The specified module could not be found. While attempting to import TensorFlow

前端 未结 1 1827
谎友^
谎友^ 2021-01-29 06:06

I get the following error while attempting to import TensorFlow. I tried rolling back to C++ Redist. 2015 (from 2017) and still not working. Win10, Python 3.5(64)

相关标签:
1条回答
  • 2021-01-29 06:38

    My Working setup in Windows 10 and GTX960M:

    • Install python 3.5.x
    • Microsoft visual studio 2015 community edition.
    • Download and install CUDA toolkit 8.0
    • Download CuDNN v5.1.
    • Set CUDA_HOME (\CUDA) and %CUDA_HOME%\bin in PATH.
    • Extract the cuDNN files to a folder and add that location(the folder where bin,lib, include folders are) also to PATH make sure that cuDNN DLLs are properly set in %PATH%.
    • Copy the respective files from cuDNN to folders in cuda installation directory(This solved my issues): copy cudnn64_5.dll to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin. copy cudnn.h to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include. copy cudnn.lib to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64.
    • Make sure that I have MSVCP140.dll in C:\Windows\System32 and C:\Windows\SysWOW64. If not download it from here: https://www.microsoft.com/en-us/download/details.aspx?id=53587 and install it.

    I strongly think these versioning is a bit important in this case. I tried using cuDNN 6.0 which failed. but 5.1 worked.

    0 讨论(0)
提交回复
热议问题