0

I just installed TF into a fresh conda environment and I tried installing a couple versions of cudnn, not sure if relevant. GPU is not working because I am getting this error:

tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory

and indeed I look in /usr/local/cuda/lob64 and the file i see there is libcudart.so.10.1, so it isn't the right version I guess (the 10 should be an 11). Does anyone know which package I need to install to get this libcudart.so.11.0 file? If not maybe I could just use an older version of tensorflow? (I just tried pip install tensorflow==2.3.0 to no avail, could not find the package.) So i think the better option is somehow getting the newer libcudart file, maybe this means I need to upgrade cuda?

talonmies
  • 70,661
  • 34
  • 192
  • 269
jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
  • well i installed directly with conda instead of pip and somehow it figured out how to install the correct versions and it works! – jeffery_the_wind Jun 06 '21 at 12:04
  • 1
    If you are using condos to install everything, you should get a matching version of their cuda-toolkit package which will provision the correct version of the runtime libraries for the version of tensorflow you have installed. However you have managed to break this, you clearly need the CUDA 11.0 runtime – talonmies Jun 06 '21 at 12:05
  • @talonmies yes thank you, in the question i left out that I used pip to install, since those are the official instructions on the TF site. However I found a tutorial that suggests what you said to use conda to install and yes it works. – jeffery_the_wind Jun 06 '21 at 13:18

1 Answers1

0

Please create an virtual_environment to install tensorflow in Anaconda.

Follow below code to install TensorFlow in virtual_environment:

conda create -n tf tensorflow  #Create a Virtual environment(tf).
conda activate tf              #Activate the Virtual environment
conda install tensorflow-gpu   #install TensorFlow-gpu in it.

When you run conda install tensorflow-gpu, this will install all required set of libraries and packages along with compatible version of CUDA, cuDNN automatically in your system.

If you want to install specific version of tensorflow-gpu , you can execute below code:

conda install tensorflow-gpu==2.3.0  # specified version

Note: You need to activate the virtual_environment each time you want to use TensorFlow.

Please check this link for tensorflow build configuration details.