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?

1
  • These are all warnings indicating you don't have the needed libraries for Nvidia GPU support in TF. If you don't need it - you can safely ignore those.
    – favoretti
    Jan 28, 2020 at 17:58

2 Answers 2

2

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

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.