Lei Mao bio photo

Lei Mao

Machine Learning, Artificial Intelligence. On the Move.

Twitter Facebook LinkedIn GitHub   G. Scholar E-Mail RSS

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

$ 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

$ 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

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

References