I am having Error importing tensorflow as tf?

Viewed 294

while importing tensorflow

Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory

2020-08-28 00:21:19.206030: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

system

  • Hp 245 g5 notebook
  • operating system ubuntu 18.4

How to solve the problem?

1 Answers

It seems you are trying to use the TensorFlow-GPU version and you have downloaded conflicting software versions for it.

Note: GPU support is available for Ubuntu and Windows with CUDA enabled cards only.

If you have a Cuda enabled card follow the instructions provided below.

As stated in Tensorflow documentation. The software requirements are as follows.

Nvidia gpu drivers - 418.x or higher
Cuda - 10.1 (TensorFlow >= 2.1.0)
cuDNN - 7.6

Make sure you have these exact versions of the software mentioned above. See this

Also, check the system requirements here.

For downloading the software mentioned above see here.

For downloading TensorFlow follow the instructions provided here to correctly install the necessary packages.

Related