Lei Mao bio photo

Lei Mao

Machine Learning, Artificial Intelligence, Computer Science.

Twitter Facebook LinkedIn GitHub   G. Scholar E-Mail RSS


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-
$ sudo -H python3 -m pip install graphsurgeon-0.4.1-py2.py3-none-any.whl

TensorRT Python Library

$ cd TensorRT-
$ sudo -H python3 -m pip install tensorrt-

Convert-to-Uff Executable Tool

$ cd TensorRT-
$ sudo -H python3 -m pip install uff-0.6.3-py2.py3-none-any.whl