Installing TensorRT Python Components

Introduction

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

1
2
$ cd TensorRT-5.1.5.0/graphsurgeon
$ sudo -H python3 -m pip install graphsurgeon-0.4.1-py2.py3-none-any.whl

TensorRT Python Library

1
2
$ cd TensorRT-5.1.5.0/python
$ sudo -H python3 -m pip install tensorrt-5.1.5.0-cp36-none-linux_x86_64.whl

Convert-to-Uff Executable Tool

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

References

Author

Lei Mao

Posted on

06-11-2019

Updated on

06-11-2019

Licensed under


Comments