Could not load dynamic library 'cudart64_101.dll' on tensorflow CPU-only installation

前端 未结 13 1488
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 04:02

I just installed the latest version of Tensorflow via pip install tensorflow and whenever I run a program, I get the log message:

W tenso

相关标签:
13条回答
  • 2020-11-28 04:34

    This answer might be helpful if you see above error but actually you have CUDA 10 installed:

    pip install tensorflow-gpu==2.0.0
    

    output:

    I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
    

    which was the solution for me.

    0 讨论(0)
  • 2020-11-28 04:36

    This solution worked for me :

    I preinstalled the environnement with anaconda (here is the code)

    conda create -n YOURENVNAME python=3.6 // 3.6> incompatible with keras
    conda activate YOURENVNAME
    conda install tensorflow-gpu
    conda install -c anaconda keras
    conda install -c anaconda scikit-learn
    conda install matplotlib
    

    but after I had still these warnings

    2020-02-23 13:31:44.910213: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
    
    2020-02-23 13:31:44.925815: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll
    
    2020-02-23 13:31:44.941384: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll
    
    2020-02-23 13:31:44.947427: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll
    
    2020-02-23 13:31:44.965893: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll
    
    2020-02-23 13:31:44.982990: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll
    
    2020-02-23 13:31:44.990036: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found
    

    How I solved the first warning : I just download a zip file wich contained all the cudnn files (dll, etc) here : https://developer.nvidia.com/cudnn

    How I solved the second warning : I looked the last missing file (cudart64_101.dll) in my virtual env created by conda and I just copy/pasted it in the same lib folder than for the .dll cudnn

    0 讨论(0)
  • 2020-11-28 04:41

    Tensorflow 2.1 works with Cuda 10.1.

    If you want a quick hack:

    • Just download cudart64_101.dll from here. Extract the zip file and copy the cudart64_101.dll to your CUDA bin directory

    Else:

    • Install Cuda 10.1
    0 讨论(0)
  • 2020-11-28 04:42

    a simpler way would be to create a link called cudart64_101.dll to point to cudart64_102.dll. this is not very orthodox but since tensorflow is looking for cudart64_101.dll exported symbols and the nvidia folks are not amateurs, they would most likely not remove symbols from 101 to 102. it works, based on this assumption (mileage may vary)

    0 讨论(0)
  • 2020-11-28 04:44

    TensorFlow 2.3.0 works fine with CUDA 11. But you have to install tf-nightly-gpu (after you installed tensorflow and CUDA 11): https://pypi.org/project/tf-nightly-gpu/

    Try:

    pip install tf-nightly-gpu
    

    Afterwards you'll get the message in your console:

    I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_110.dll
    
    0 讨论(0)
  • 2020-11-28 04:45

    To install the prerequisites for GPU support in TensorFlow 2.1:

    1. Install your latest GPU drivers.
    2. Install CUDA 10.1.
      • If the CUDA installer reports "you are installing an older driver version", you may wish to choose a custom installation and deselect some components. Indeed, note that software bundled with CUDA including GeForce Experience, PhysX, a Display Driver, and Visual Studio integration are not required by TensorFlow.
      • Also note that TensorFlow requires a specific version of the CUDA Toolkit unless you build from source; for TensorFlow 2.1 and 2.2, this is currently version 10.1.
    3. Install cuDNN.
      1. Download cuDNN v7.6.4 for CUDA 10.1. This will require you to sign up to the NVIDIA Developer Program.
      2. Unzip to a suitable location and add the bin directory to your PATH.
    4. Install tensorflow by pip install tensorflow.
    5. You may need to restart your PC.
    0 讨论(0)
提交回复
热议问题