Getting error while installing nvidia-tensorrt
Traceback (most recent call last):
File “setup.py”, line 2, in
import tensorrt
ImportError: No module named tensorrt
Trying to run a python code with tensorrt on AGX dev kit. The import tensorrt as trt
seems to show tensorrt is there, when I try to run the code, it says:
Tried following the steps in TensorRT documentation. Installed
PyCUDA
. Installednvidia-pyindex
successfully as well. But when I try to installnvidia-tensorrt
, I get the following error:mymachine@ds5:~/torch2trt$ pip3 install nvidia-tensorrt
Collecting nvidia-tensorrt
Using cached nvidia-tensorrt-0.0.1.dev5.tar.gz (7.9 kB)
Preparing metadata (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /home/mymachine/venv36/bin/python3 -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-_vdh3a3e/nvidia-tensorrt_294742780ede46439b9ee6b123e81f63/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-_vdh3a3e/nvidia-tensorrt_294742780ede46439b9ee6b123e81f63/setup.py’“'”‘;f = getattr(tokenize, ‘"’“‘open’”’“‘, open)(file) if os.path.exists(file) else io.StringIO(’”‘“‘from setuptools import setup; setup()’”’“‘);code = f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ --no-user-cfg egg_info --egg-base /tmp/pip-pip-egg-info-yg1nzvvk
cwd: /tmp/pip-install-_vdh3a3e/nvidia-tensorrt_294742780ede46439b9ee6b123e81f63/
Complete output (16 lines):
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-_vdh3a3e/nvidia-tensorrt_294742780ede46439b9ee6b123e81f63/setup.py”, line 150, in
raise RuntimeError(open(“ERROR.txt”, “r”).read())
RuntimeError:
###########################################################################################
The package you are trying to install is only a placeholder project on PyPI.org repository.
This package is hosted on NVIDIA Python Package Index.This package can be installed as:
$ pip install nvidia-pyindex $ pip install nvidia-tensorrt
###########################################################################################
WARNING: Discarding https://files.pythonhosted.org/packages/b8/a3/3da2bd25b6243d7a19b6c08c0e92f7c04f9863e70d213fee3141d574dccb/nvidia-tensorrt-0.0.1.dev5.tar.gz#sha256=827ccb3e26fda9d08dc1d8b9aeccaea17134818575245c99488db08825cf0c93 (from Links for nvidia-tensorrt). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached nvidia-tensorrt-0.0.1.dev4.tar.gz (3.8 kB)
Preparing metadata (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /home/mymachine/venv36/bin/python3 -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-_vdh3a3e/nvidia-tensorrt_c77efecdd6f440dc99ff44ee11f13ac0/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-_vdh3a3e/nvidia-tensorrt_c77efecdd6f440dc99ff44ee11f13ac0/setup.py’“'”‘;f = getattr(tokenize, ‘"’“‘open’”’“‘, open)(file) if os.path.exists(file) else io.StringIO(’”‘“‘from setuptools import setup; setup()’”’“‘);code = f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ --no-user-cfg egg_info --egg-base /tmp/pip-pip-egg-info-l54ksd62
cwd: /tmp/pip-install-_vdh3a3e/nvidia-tensorrt_c77efecdd6f440dc99ff44ee11f13ac0/
Complete output (15 lines):
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-_vdh3a3e/nvidia-tensorrt_c77efecdd6f440dc99ff44ee11f13ac0/setup.py”, line 150, in
raise RuntimeError(open(“ERROR.txt”, “r”).read())
RuntimeError:
###########################################################################################
The package you are trying to install is only a placeholder project on PyPI.org repository.
This package is hosted on NVIDIA Python Package Index.This package can be installed as:
$ pip install nvidia-pyindex $ pip install nvidia-tensorrt
###########################################################################################
WARNING: Discarding https://files.pythonhosted.org/packages/bf/88/324f19e3cc94c98421072c591ccd8170e0286d818a372eb38d45cc631119/nvidia-tensorrt-0.0.1.dev4.tar.gz#sha256=70f7ce9661852730482e51470f026d12149e53ad61acdf3d79cb5874d3cf677b (from Links for nvidia-tensorrt). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement nvidia-tensorrt (from versions: 0.0.1.dev4, 0.0.1.dev5)
ERROR: No matching distribution found for nvidia-tensorrt
Environment
TensorRT Version: 8.0.1.6
GPU Type: AGX Xavier
Nvidia Driver Version: Jetpack 4.6
CUDA Version: 10.2
CUDNN Version: 8.2.1.32
Operating System + Version: Jetpack 4.6
Python Version (if applicable): python 3.6
TensorFlow Version (if applicable): 2.7.0
PyTorch Version (if applicable): 1.10
Baremetal or Container (if container which image + tag):