본문 바로가기

프로그래밍/AI:ML:DL

tensorflow 2.1 : Could not load dynamic library 'libnvinfer.so.6'

ubuntu + anaconda3 + python3.6 + tensorflow2.1 설치된 환경에서 import tensorflow as tf 를 하였을 때 'libnvinfer.so.6' 등의 라이브러리를 로드하지 못하였다는 경고메시지( 메시지 첫머리의 W 는 Warning 이란 뜻. )가 나온다.

검색해 보니, Nvidia gpu 의 TensorRT 라이브러리에 관련된 경고메시지이며, 일단 무시해도 된다고 한다.

경고메시지

>>> import tensorflow as tf

2020-03-18 17:20:22.911535: 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; LD_LIBRARY_PATH: /usr/local/cuda-10.1/lib64:/usr/local/cuda-10.1/extras/CUPTI/lib64:/usr/local/cuda-10.1/lib::/home/ubuntu/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorflow
2020-03-18 17:20:22.911643: 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; LD_LIBRARY_PATH: /usr/local/cuda-10.1/lib64:/usr/local/cuda-10.1/extras/CUPTI/lib64:/usr/local/cuda-10.1/lib::/home/ubuntu/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorflow
2020-03-18 17:20:22.911663: 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.

>>> tf.__version__
'2.1.0'

 

https://stackoverflow.com/a/60368453/100093

 

Could not load dynamic library 'libnvinfer.so.6'

I am trying to normally import the TensorFlow python package, but I get the following error: Here is the text from the above terminal image: 2020-02-23 19:01:06.163940: W tensorflow/stream_executor/

stackoverflow.com

의 첫줄을 번역해 보면 다음과 같다.

이 경고메시지는 에러가 아니다. 경고메시지가 나와도 텐서플로우를 사용하는 데 지장이 없다. libnvinfer 와 libnvinfer_plugin 공유라이브러리는 옵션이며, nvidia의 TensorRT 기능을 사용할 때에만 필요하다.

This is a warning, not an error. You can still use TensorFlow. The shared libraries libnvinfer and libnvinfer_plugin are optional and required only if you are using nvidia's TensorRT capabilities.

 

 

 

728x90