[TensorRT] ERROR: The engine plan file is not compatible with this version of TensorRT, expecting library version 5.1.5 got 5.1.6, please rebuild.

Hi ,I have installed TensorRT 5.1.5 .But when i run the below code
engine = runtime.deserialize_cuda_engine(f.read()) i am getting the below error .

[TensorRT] ERROR: The engine plan file is not compatible with this version of TensorRT, expecting library version 5.1.5 got 5.1.6, please rebuild.

But i have installed version 5.1.5 .The result of pip3 list | grep tensorrt is
tensorrt (5.1.5.0)

Can any one suggest suitable solution?

Pretty similar issue is what I’m facing.

See https://devtalk.nvidia.com/default/topic/1062604/tensorrt/the-engine-plan-file-is-not-compatible-with-this-version-of-tensorrt-expecting-library-version-5-1-/

Make sure the version of TensorRT deserializing an engine is the same as the version of TensorRT which serialized the engine. You may need to rebuild your engine and write it to disk again.

Regards,
Tom

The engine is build on TensorRT 5.1.5 and also, installed TRT 5.1.5. It still gives me -
ERROR: The engine plan file is not compatible with this version of TensorRT, expecting library version 5.1.5 got 5.0.2, please rebuild.
I also made sure to check if there is any installation TRT 5.0.2 on my PC , So I purged whole TRT, and reinstalled 5.1.5, still getting the same error.

I am also facing the same issue, TensorRT 5.1.6 is by default installed on Jetson Nano, but 5.1.6 is not available for desktop, So I installed 5.1.5 and it is showing similar error.

[TensorRT] ERROR: The engine plan file is not compatible with this version of TensorRT, expecting library version 5.1.5 got 5.1.6, please rebuild.

Me too, any resolution or guide from offical ? How to remove the 5.0.2 compeletely ?

I faced the same problem when trying to run the model converted from Tensorflow frozen graph to TensorRT .bin file.
The problem is that the frozen graph was converted to .bin file in Jetson Nano device, which have the TensorRT version 5.1.6…
So the .bin file cannot be loaded correctly on my laptop having TensorRT version 5.1.5.

I fixed it by re-converting model from frozen graph to .bin file on laptop again and everything is working fine now.