Depending on the TensorRT tasks you are working on, you may have to use TensorRT Python components, including the Python libraries tensorrt, graphsurgeon, and the executable Python Uff parser convert-to-uff. Depending on how you installed TensorRT, those Python components might have not been installed or configured correctly. Especially when you installed via tar file, it is more likely to happen. TensorRT official installation guide, however, does not provide any guidance when the installation of the Python components was not successful.
Python Components Installation Guide
Most likely there is a bug in pip or pip3 which caused the installation failure of these Python components. Instead of using
sudo pip install or
sudo pip3 install, we are using the following commands to install.
Graph Surgeon Python Library
$ cd TensorRT-18.104.22.168/graphsurgeon $ sudo -H python3 -m pip install graphsurgeon-0.4.1-py2.py3-none-any.whl
TensorRT Python Library
$ cd TensorRT-22.214.171.124/python $ sudo -H python3 -m pip install tensorrt-126.96.36.199-cp36-none-linux_x86_64.whl
Convert-to-Uff Executable Tool
$ cd TensorRT-188.8.131.52/uff $ sudo -H python3 -m pip install uff-0.6.3-py2.py3-none-any.whl