while working with trt pose repository " GitHub - NVIDIA-AI-IOT/trt_pose: Real-time pose estimation accelerated with NVIDIA TensorRT "
getting error while running command : sudo python3 setup.py install
error : ModuleNotFoundError: No module named ‘tensorrt’.
I tried installing tensorrt with this command : “pip install nvidia-pyindex
pip install nvidia-tensorrt” and its installed “nvidia-tensorrt-99.0.0 and tensorrt-8.6.1”.
But after this also it is throwing the same error that no module named tensorrt.
VM specifications for your reference : NVIDIA-SMI 525.85.12 Driver Version: 525.85.12 CUDA Version: 12.0
what is the correct version of tensorrt that i need to install with this vm specification and what is the command for the installation.
Hi,
Please checkout Support Matrix :: NVIDIA Deep Learning TensorRT Documentation.
Also, we recommend you follow the installation guide.
Thank you.
To setup dGPU in Ubuntu 20.04 on Nvidia T4 machine
https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Quickstart.html
-
sudo apt-get update
-
Install Dependencies
sudo apt install
libssl1.1
libgstreamer1.0-0
gstreamer1.0-tools
gstreamer1.0-plugins-good
gstreamer1.0-plugins-bad
gstreamer1.0-plugins-ugly
gstreamer1.0-libav
libgstreamer-plugins-base1.0-dev
libgstrtspserver-1.0-0
libjansson4
libyaml-cpp-dev
libjsoncpp-dev
protobuf-compiler
gcc
make
git
python3
-
Install CUDA Toolkit 11.8
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
sudo add-apt-repository “deb Index of /compute/cuda/repos/ubuntu2004/x86_64 /”
sudo apt-get update
sudo apt-get install cuda-toolkit-11-8
-
Install NVIDIA driver 525.85.12
wget https://us.download.nvidia.com/tesla/525.85.12/NVIDIA-Linux-x86_64-525.85.12.run
chmod 755 NVIDIA-Linux-x86_64-525.85.12.run
sudo ./NVIDIA-Linux-x86_64-525.85.12.run --no-cc-version-check
-
Install PyTorch
Start Locally | PyTorch
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
-
Install tensorrt
Installation Guide :: NVIDIA Deep Learning TensorRT Documentation
a. wget https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/tars/TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-12.0.tar.gz
b. tar -xzvf TensorRT-8.6.1.6.Linux.x86_64-gnu.cuda-12.0.tar.gz
c. cd TensorRT-8.6.1.6/lib
d. pwd → output (/home/mastekinnovation/TensorRT-8.6.1.6/lib)
e. export LD_LIBRARY_PATH=/home/mastekinnovation/TensorRT-8.6.1.6/lib
f. cd TensorRT-8.6.1.6/python
g. python3 -m pip install tensorrt-8.6.1-cp38-none-linux_x86_64.whl
h. cd TensorRT-8.6.1.6/uff
i. python3 -m pip install uff-0.6.9-py2.py3-none-any.whl
j. cd TensorRT-8.6.1.6/graphsurgeon
k. python3 -m pip install graphsurgeon-0.4.6-py2.py3-none-any.whl
l. cd TensorRT-8.6.1.6/onnx_graphsurgeon
m. python3 -m pip install onnx_graphsurgeon-0.3.12-py2.py3-none-any.whl
-
Install torch2trt
GitHub - NVIDIA-AI-IOT/trt_pose: Real-time pose estimation accelerated with NVIDIA TensorRT
git clone GitHub - NVIDIA-AI-IOT/torch2trt: An easy to use PyTorch to TensorRT converter
cd torch2trt
sudo python3 setup.py install --plugins
At this point we are getting “tensorrt module not found”
Please help

Hi,
Please refer to the installation steps from the below link if in case you are missing on anything
Also, we suggest you to use TRT NGC containers to avoid any system dependency related issues.
Thanks!