Even though I see:
apt show nvidia-tensorrt
Package: nvidia-tensorrt
Version: 5.1.1-b56
Priority: standard
Section: metapackages
Maintainer: NVIDIA Corporation
Installed-Size: 205 kB
Depends: libnvinfer-bin (= 8.5.2-1+cuda11.4), libnvinfer8 (= 8.5.2-1+cuda11.4), libnvparsers8 (= 8.5.2-1+cuda11.4), libnvinfer-plugin8 (= 8.5.2-1+cuda11.4), libnvonnxparsers8 (= 8.5.2-1+cuda11.4)
Conflicts: libnvinfer-plugin6, libnvinfer-plugin7, libnvinfer6, libnvinfer7, libnvonnxparsers6, libnvonnxparsers7, libnvparsers6, libnvparsers7, python-libnvinfer
Homepage: Jetson - Embedded AI Computing Platform | NVIDIA Developer
Download-Size: 27.3 kB
APT-Sources: https://repo.download.nvidia.com/jetson/common r35.3/main arm64 Packages
Description: NVIDIA TensorRT Meta Package
I am unable to import tensorrt as described below irrespective of the environment I am in:
Python 3.8.17 (default, Jul 5 2023, 20:40:03)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type âhelpâ, âcopyrightâ, âcreditsâ or âlicenseâ for more information.
import tensorrt as trt
Traceback (most recent call last):
File ââ, line 1, in
ModuleNotFoundError: No module named âtensorrtâ
If I do a pip installation of Tensorrt, I fail to build the wheel and the error is described below:
pip install tensorrt
Collecting tensorrt
Downloading tensorrt-8.6.1.tar.gz (16 kB)
Preparing metadata (setup.py) ⊠done
Building wheels for collected packages: tensorrt
Building wheel for tensorrt (setup.py) ⊠error
error: subprocess-exited-with-error
Ă python setup.py bdist_wheel did not run successfully.
â exit code: 1
â°â> [65 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/tensorrt
copying tensorrt/init.py â build/lib/tensorrt
running egg_info
writing tensorrt.egg-info/PKG-INFO
writing dependency_links to tensorrt.egg-info/dependency_links.txt
writing requirements to tensorrt.egg-info/requires.txt
writing top-level names to tensorrt.egg-info/top_level.txt
reading manifest file âtensorrt.egg-info/SOURCES.txtâ
adding license file âLICENSE.txtâ
writing manifest file âtensorrt.egg-info/SOURCES.txtâ
/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer, pypa/build or
other standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
installing to build/bdist.linux-aarch64/wheel
running install
Looking in indexes: https://pypi.nvidia.com
ERROR: Could not find a version that satisfies the requirement tensorrt_libs==8.6.1 (from versions: none)
ERROR: No matching distribution found for tensorrt_libs==8.6.1
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-cpfzofbz/tensorrt_e506330037c640aba1576df8e6923f5c/setup.py", line 49, in <module>
setup(
File "/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 360, in run
self.run_command("install")
File "/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-install-cpfzofbz/tensorrt_e506330037c640aba1576df8e6923f5c/setup.py", line 43, in run
install_dep("{:}_libs".format(tensorrt_module))
File "/tmp/pip-install-cpfzofbz/tensorrt_e506330037c640aba1576df8e6923f5c/setup.py", line 41, in install_dep
status.check_returncode()
File "/home/shepherdlab/miniconda3/envs/tf_install/lib/python3.8/subprocess.py", line 448, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['/home/shepherdlab/miniconda3/envs/tf_install/bin/python', '-m', 'pip', 'install', 'tensorrt_libs==8.6.1', '--index-url', 'https://pypi.nvidia.com']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tensorrt
Running setup.py clean for tensorrt
Failed to build tensorrt
ERROR: Could not build wheels for tensorrt, which is required to install pyproject.toml-based projects