ImportError: libnvinfer.so.7: cannot open shared object file: No such file or directory

安装好tensorrt之后,import tensort报错,是因为没有配置好环境变量

export LD_LIBRARY_PATH=/models/TensorRT-7.2.3.4/lib:$LD_LIBRARY_PATH

/models/TensorRT-7.2.3.4/  替换为自己的tensorrt安装路径

你可能感兴趣的:(tensorrt,模型压缩与加速,深度学习,pytorch,人工智能)