'Tensorflow import is very slow because it's looking for "cudart64_110.dll". I don't have a gpu. Is there a cpu-only version?

When I run a script that imports tensorflow (2.8) it spend 10+ seconds printing the message below before running my script. I don't have a gpu.

From what I can find on here, v2 upwards combines cpu/gpu versions. Is it possible to stop the gpu check?

2022-02-04 10:15:46.628917: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-02-04 10:15:47.068570: 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.


Solution 1:[1]

Yes, You can surpass these warnings(W) or informational(I) messages using below code:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

You can also check this link for more details on TensorFlow installation.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 TFer2