figs_and_nuts
figs_and_nuts

Reputation: 5771

Installation errors with tensorflow 2.1.0

  1. pip3 --version == pip 20.0.2 from /home/nitin/anaconda3/envs/tensorflow/lib/python3.7/site-packages/pip (python 3.7)
  2. python --version == python 3.7.6

i created an environment with conda create --name tensorflow. I had tensorflow 2.0 installed in it with which, i did with conda. I upgraded it with pip install --upgrade tensorflow from inside the tensorflow environment

Now, when i do import tensorflow as tf i get the following error

2020-01-28 23:01:06.791110: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory 2020-01-28 23:01:06.791210: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory 2020-01-28 23:01:06.791226: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.

I dont seem to understand what went wrong. Any help?

Upvotes: 0

Views: 1800

Answers (2)

Iswariya Manivannan
Iswariya Manivannan

Reputation: 724

This is just warning from tensorflow stating that if you want to improve latency and throughput of some models you can harness the power of tensorRT. However you cannot use it because libnvinfer is not installed. In order to install it,

wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb

sudo apt install ./nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb

sudo apt-get update

sudo apt-get install -y --no-install-recommends \
    libnvinfer6=6.0.1-1+cuda10.1 \
    libnvinfer-dev=6.0.1-1+cuda10.1 \
    libnvinfer-plugin6=6.0.1-1+cuda10.1

This is with reference to the installation instructions provided by tensorflow

Upvotes: 2

aurora
aurora

Reputation: 70

If you are using python 3.7 CPU then upgrade it like: pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.1.0-cp37-cp37m-manylinux2010_x86_64.whl

Upvotes: 1

Related Questions