7

how do you install only a CPU version of Tensorflow 2.x using pip ? In the past, it was possible to install this 2 different versions.

Since I am running the scripts in a nonen GPU device ( without envidia card, intel card available without cuda support), I am getting following error:

2020-04-14 23:28:14.632879: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory 2020-04-14 23:28:14.632902: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: UNKNOWN ERROR (303)

In the past my workaround was to use a CPU only version.

Thanks for the hints in advance

Mono Brezel
  • 133
  • 1
  • 2
  • 6
  • That is not an error, just a warning, ignore it and tensorflow will run in the CPU. – Dr. Snoopy Apr 13 '20 at 16:14
  • 1
    No such file or directory 2020-04-14 23:28:14.632902: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: UNKNOWN ERROR (303). This is an error, in the past I just got a W and I ignore it. – Mono Brezel Apr 14 '20 at 00:59

2 Answers2

10

You can choose the CPU-only version of tensorflow depending on your python version. Check the list here: https://www.tensorflow.org/install/pip#package-location

e.g. you will need to do the following for Python 3.8:

pip3 install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.3.0-cp38-cp38-manylinux2010_x86_64.whl
DesiKeki
  • 656
  • 8
  • 9
5

Issue solved after installing a CPU only version.

I used pin tensorflow-cpu and the version of the release. Somehow the fallback solution for CPU did not work in my setup.

Mono Brezel
  • 133
  • 1
  • 2
  • 6