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 | $ cd TensorRT-5.1.5.0/graphsurgeon |
TensorRT Python Library
1 | $ cd TensorRT-5.1.5.0/python |
Convert-to-Uff Executable Tool
1 | $ cd TensorRT-5.1.5.0/uff |
References
Installing TensorRT Python Components
https://leimao.github.io/blog/Installing-TensorRT-Python-Components/