NVIDIA / TensorRT

NVIDIA® TensorRT™ is an SDK for high-performance deep learning inference on NVIDIA GPUs. This repository contains the open source components of TensorRT.
https://developer.nvidia.com/tensorrt
Apache License 2.0
10.87k stars 2.14k forks source link

Failed to pip install TensorRT 10.5.0 #4213

Closed NevermindNilas closed 1 month ago

NevermindNilas commented 1 month ago

Description

Running command: pip install tensorrt==10.5.0

Results in:

Defaulting to user installation because normal site-packages is not writeable
Collecting tensorrt==10.5.0
  Using cached tensorrt-10.5.0-py2.py3-none-any.whl
Collecting tensorrt-cu12==10.5.0 (from tensorrt==10.5.0)
  Using cached tensorrt-cu12-10.5.0.tar.gz (18 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: tensorrt-cu12
  Building wheel for tensorrt-cu12 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for tensorrt-cu12 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [91 lines of output]
      running bdist_wheel
      C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\_distutils\cmd.py:111: SetuptoolsDeprecationWarning: bdist_wheel.universal is deprecated
      !!

              ********************************************************************************
              With Python 2.7 end-of-life, support for building universal wheels
              (i.e., wheels that support both Python 2 and Python 3)
              is being obviated.
              Please discontinue using this option, or if you still need it,
              file an issue with pypa/setuptools describing your use case.

              By 2025-Aug-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
              ********************************************************************************

      !!
        self.finalize_options()
      running build
      running build_py
      creating build\lib\tensorrt
      copying tensorrt\__init__.py -> build\lib\tensorrt
      running egg_info
      writing tensorrt_cu12.egg-info\PKG-INFO
      writing dependency_links to tensorrt_cu12.egg-info\dependency_links.txt
      writing requirements to tensorrt_cu12.egg-info\requires.txt
      writing top-level names to tensorrt_cu12.egg-info\top_level.txt
      reading manifest file 'tensorrt_cu12.egg-info\SOURCES.txt'
      adding license file 'LICENSE.txt'
      writing manifest file 'tensorrt_cu12.egg-info\SOURCES.txt'
      installing to build\bdist.win-amd64\wheel
      running install
      Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com
      Collecting tensorrt-cu12_libs==10.5.0
        Using cached https://pypi.nvidia.com/tensorrt-cu12-libs/tensorrt_cu12_libs-10.5.0-py2.py3-none-win_amd64.whl (1079.4 MB)
      Collecting tensorrt-cu12_bindings==10.5.0
        Using cached https://pypi.nvidia.com/tensorrt-cu12-bindings/tensorrt_cu12_bindings-10.5.0-cp312-none-win_amd64.whl (772 kB)
      Collecting nvidia-cuda-runtime-cu12 (from tensorrt-cu12_libs==10.5.0)
        Using cached https://pypi.nvidia.com/nvidia-cuda-runtime-cu12/nvidia_cuda_runtime_cu12-12.6.77-py3-none-win_amd64.whl (891 kB)
      Installing collected packages: tensorrt-cu12_bindings, nvidia-cuda-runtime-cu12, tensorrt-cu12_libs
      ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\tensorrt_cu12_bindings-10.5.0.dist-info'
      Consider using the `--user` option or check the permissions.

      Traceback (most recent call last):
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\build_meta.py", line 434, in build_wheel
          return _build(['bdist_wheel', '--dist-info-dir', metadata_directory])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\build_meta.py", line 422, in _build
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\build_meta.py", line 403, in _build_with_temp_dir
          self.run_setup()
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\build_meta.py", line 516, in run_setup
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 129, in <module>
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 183, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 199, in run_commands
          dist.run_commands()
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 954, in run_commands
          self.run_command(cmd)
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\dist.py", line 991, in run_command
          super().run_command(command)
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
          cmd_obj.run()
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\command\bdist_wheel.py", line 442, in run
          self.run_command("install")
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\dist.py", line 991, in run_command
          super().run_command(command)
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-o8ff__4z\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
          cmd_obj.run()
        File "<string>", line 75, in run
        File "<string>", line 42, in run_pip_command
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['C:\\Users\\nilas\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\python.exe', '-m', 'pip', 'install', '--extra-index-url', 'https://pypi.nvidia.com', 'tensorrt-cu12_libs==10.5.0', 'tensorrt-cu12_bindings==10.5.0']' 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-cu12
Failed to build tensorrt-cu12
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (tensorrt-cu12)

Environment

TensorRT Version: 10.5.0

NVIDIA GPU: RTX 3090

NVIDIA Driver Version: 565.90

CUDA Version: 12.7

CUDNN Version: 9.1.0

Operating System: Windows 11 23H2

Python Version (if applicable): 3.12.7 ( Microsoft Store Version )

Tensorflow Version (if applicable): N/A

PyTorch Version (if applicable): 2.5.0 CUDA 12.4

Baremetal or Container (if so, version): Baremetal

Relevant Files

N/A

NevermindNilas commented 1 month ago

Verbose ( --verbose ) output:

~  pip install tensorrt==10.5.0 --verbose
Using pip 24.2 from C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip (python 3.12)
Defaulting to user installation because normal site-packages is not writeable
Collecting tensorrt==10.5.0
  Using cached tensorrt-10.5.0-py2.py3-none-any.whl
Collecting tensorrt-cu12==10.5.0 (from tensorrt==10.5.0)
  Using cached tensorrt-cu12-10.5.0.tar.gz (18 kB)
  Running command pip subprocess to install build dependencies
  Using pip 24.2 from C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip (python 3.12)
  Collecting setuptools>=40.8.0
    Obtaining dependency information for setuptools>=40.8.0 from https://files.pythonhosted.org/packages/31/2d/90165d51ecd38f9a02c6832198c13a4e48652485e2ccf863ebb942c531b6/setuptools-75.2.0-py3-none-any.whl.metadata
    Using cached setuptools-75.2.0-py3-none-any.whl.metadata (6.9 kB)
  Using cached setuptools-75.2.0-py3-none-any.whl (1.2 MB)
  Installing collected packages: setuptools
  ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
  torchaudio 2.4.1+cu124 requires torch==2.4.1+cu124, but you have torch 2.5.0+cu124 which is incompatible.
  Successfully installed setuptools-75.2.0
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  Getting requirements to build wheel ... done
  Running command pip subprocess to install backend dependencies
  Using pip 24.2 from C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip (python 3.12)
  Collecting pip
    Obtaining dependency information for pip from https://files.pythonhosted.org/packages/d4/55/90db48d85f7689ec6f81c0db0622d704306c5284850383c090e6c7195a5c/pip-24.2-py3-none-any.whl.metadata
    Using cached pip-24.2-py3-none-any.whl.metadata (3.6 kB)
  Collecting wheel
    Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/1b/d1/9babe2ccaecff775992753d8686970b1e2755d21c8a63be73aba7a4e7d77/wheel-0.44.0-py3-none-any.whl.metadata
    Using cached wheel-0.44.0-py3-none-any.whl.metadata (2.3 kB)
  Using cached pip-24.2-py3-none-any.whl (1.8 MB)
  Using cached wheel-0.44.0-py3-none-any.whl (67 kB)
  Installing collected packages: wheel, pip
    Creating C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\normal\Scripts
  Successfully installed pip-24.2 wheel-0.44.0
  Installing backend dependencies ... done
  Running command Preparing metadata (pyproject.toml)
  running dist_info
  creating C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-xly0ccv1\tensorrt_cu12.egg-info
  writing C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-xly0ccv1\tensorrt_cu12.egg-info\PKG-INFO
  writing dependency_links to C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-xly0ccv1\tensorrt_cu12.egg-info\dependency_links.txt
  writing requirements to C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-xly0ccv1\tensorrt_cu12.egg-info\requires.txt
  writing top-level names to C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-xly0ccv1\tensorrt_cu12.egg-info\top_level.txt
  writing manifest file 'C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-xly0ccv1\tensorrt_cu12.egg-info\SOURCES.txt'
  reading manifest file 'C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-xly0ccv1\tensorrt_cu12.egg-info\SOURCES.txt'
  adding license file 'LICENSE.txt'
  writing manifest file 'C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-xly0ccv1\tensorrt_cu12.egg-info\SOURCES.txt'
  creating 'C:\Users\nilas\AppData\Local\Temp\pip-modern-metadata-xly0ccv1\tensorrt_cu12-10.5.0.dist-info'
  C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\_distutils\cmd.py:111: SetuptoolsDeprecationWarning: bdist_wheel.universal is deprecated
  !!

          ********************************************************************************
          With Python 2.7 end-of-life, support for building universal wheels
          (i.e., wheels that support both Python 2 and Python 3)
          is being obviated.
          Please discontinue using this option, or if you still need it,
          file an issue with pypa/setuptools describing your use case.

          By 2025-Aug-30, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.
          ********************************************************************************

  !!
    self.finalize_options()
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: tensorrt-cu12
  running bdist_wheellding wheel for tensorrt-cu12 (pyproject.toml)

  C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\_distutils\cmd.py:111: SetuptoolsDeprecationWarning: bdist_wheel.universal is deprecated
  !!

          ********************************************************************************
          With Python 2.7 end-of-life, support for building universal wheels
          (i.e., wheels that support both Python 2 and Python 3)
          is being obviated.
          Please discontinue using this option, or if you still need it,
          file an issue with pypa/setuptools describing your use case.

          By 2025-Aug-30, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.
          ********************************************************************************

  !!
    self.finalize_options()
  running build_py
  creating build\lib\tensorrt
  copying tensorrt\__init__.py -> build\lib\tensorrt
  running egg_info
  writing tensorrt_cu12.egg-info\PKG-INFO
  writing dependency_links to tensorrt_cu12.egg-info\dependency_links.txt
  writing requirements to tensorrt_cu12.egg-info\requires.txt
  reading manifest file 'tensorrt_cu12.egg-info\SOURCES.txt'
  adding license file 'LICENSE.txt'
  writing manifest file 'tensorrt_cu12.egg-info\SOURCES.txt'
  installing to build\bdist.win-amd64\wheel
  running install
  Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com
  Collecting tensorrt-cu12_libs==10.5.0
    Using cached https://pypi.nvidia.com/tensorrt-cu12-libs/tensorrt_cu12_libs-10.5.0-py2.py3-none-win_amd64.whl (1079.4 MB)
  Collecting tensorrt-cu12_bindings==10.5.0
    Using cached https://pypi.nvidia.com/tensorrt-cu12-bindings/tensorrt_cu12_bindings-10.5.0-cp312-none-win_amd64.whl (772 kB)
  Collecting nvidia-cuda-runtime-cu12 (from tensorrt-cu12_libs==10.5.0)
    Using cached https://pypi.nvidia.com/nvidia-cuda-runtime-cu12/nvidia_cuda_runtime_cu12-12.6.77-py3-none-win_amd64.whl (891 kB)
  Installing collected packages: tensorrt-cu12_bindings, nvidia-cuda-runtime-cu12, tensorrt-cu12_libs
  ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\tensorrt_cu12_bindings-10.5.0.dist-info'
  Consider using the `--user` option or check the permissions.

  Traceback (most recent call last):
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\build_meta.py", line 434, in build_wheel
      return _build(['bdist_wheel', '--dist-info-dir', metadata_directory])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\build_meta.py", line 422, in _build
      return self._build_with_temp_dir(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\build_meta.py", line 403, in _build_with_temp_dir
      self.run_setup()
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\build_meta.py", line 516, in run_setup
      super().run_setup(setup_script=setup_script)
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
      exec(code, locals())
    File "<string>", line 129, in <module>
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 183, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 199, in run_commands
      dist.run_commands()
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 954, in run_commands
      self.run_command(cmd)
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\dist.py", line 991, in run_command
      super().run_command(command)
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
      cmd_obj.run()
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\command\bdist_wheel.py", line 442, in run
      self.run_command("install")
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\dist.py", line 991, in run_command
      super().run_command(command)
    File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-bpn8axf1\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
      cmd_obj.run()
    File "<string>", line 75, in run
    File "<string>", line 42, in run_pip_command
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 413, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['C:\\Users\\nilas\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\python.exe', '-m', 'pip', 'install', '--extra-index-url', 'https://pypi.nvidia.com', 'tensorrt-cu12_libs==10.5.0', 'tensorrt-cu12_bindings==10.5.0']' returned non-zero exit status 1.
  error: subprocess-exited-with-error

  × Building wheel for tensorrt-cu12 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: 'C:\Users\nilas\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe' 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py' build_wheel 'C:\Users\nilas\AppData\Local\Temp\tmpd60bl5zm'
  cwd: C:\Users\nilas\AppData\Local\Temp\pip-install-9uj_vic9\tensorrt-cu12_4da9af16c5a749d392c7eede027166f2
  Building wheel for tensorrt-cu12 (pyproject.toml) ... error
  ERROR: Failed building wheel for tensorrt-cu12
Failed to build tensorrt-cu12
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (tensorrt-cu12)
lix19937 commented 1 month ago

Try to pip install tensorrt==10.5.0 --user

NevermindNilas commented 1 month ago

Output:

~  pip install tensorrt==10.5.0 --user
Collecting tensorrt==10.5.0
  Using cached tensorrt-10.5.0-py2.py3-none-any.whl
Collecting tensorrt-cu12==10.5.0 (from tensorrt==10.5.0)
  Using cached tensorrt-cu12-10.5.0.tar.gz (18 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: tensorrt-cu12
  Building wheel for tensorrt-cu12 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for tensorrt-cu12 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [91 lines of output]
      running bdist_wheel
      C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\_distutils\cmd.py:111: SetuptoolsDeprecationWarning: bdist_wheel.universal is deprecated
      !!

              ********************************************************************************
              With Python 2.7 end-of-life, support for building universal wheels
              (i.e., wheels that support both Python 2 and Python 3)
              is being obviated.
              Please discontinue using this option, or if you still need it,
              file an issue with pypa/setuptools describing your use case.

              By 2025-Aug-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
              ********************************************************************************

      !!
        self.finalize_options()
      running build
      running build_py
      creating build\lib\tensorrt
      copying tensorrt\__init__.py -> build\lib\tensorrt
      running egg_info
      writing tensorrt_cu12.egg-info\PKG-INFO
      writing dependency_links to tensorrt_cu12.egg-info\dependency_links.txt
      writing requirements to tensorrt_cu12.egg-info\requires.txt
      writing top-level names to tensorrt_cu12.egg-info\top_level.txt
      reading manifest file 'tensorrt_cu12.egg-info\SOURCES.txt'
      adding license file 'LICENSE.txt'
      writing manifest file 'tensorrt_cu12.egg-info\SOURCES.txt'
      installing to build\bdist.win-amd64\wheel
      running install
      Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com
      Collecting tensorrt-cu12_libs==10.5.0
        Using cached https://pypi.nvidia.com/tensorrt-cu12-libs/tensorrt_cu12_libs-10.5.0-py2.py3-none-win_amd64.whl (1079.4 MB)
      Collecting tensorrt-cu12_bindings==10.5.0
        Using cached https://pypi.nvidia.com/tensorrt-cu12-bindings/tensorrt_cu12_bindings-10.5.0-cp312-none-win_amd64.whl (772 kB)
      Collecting nvidia-cuda-runtime-cu12 (from tensorrt-cu12_libs==10.5.0)
        Using cached https://pypi.nvidia.com/nvidia-cuda-runtime-cu12/nvidia_cuda_runtime_cu12-12.6.77-py3-none-win_amd64.whl (891 kB)
      Installing collected packages: tensorrt-cu12_bindings, nvidia-cuda-runtime-cu12, tensorrt-cu12_libs
      ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\tensorrt_cu12_bindings-10.5.0.dist-info'
      Consider using the `--user` option or check the permissions.

      Traceback (most recent call last):
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\build_meta.py", line 434, in build_wheel
          return _build(['bdist_wheel', '--dist-info-dir', metadata_directory])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\build_meta.py", line 422, in _build
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\build_meta.py", line 403, in _build_with_temp_dir
          self.run_setup()
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\build_meta.py", line 516, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 129, in <module>
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 183, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 199, in run_commands
          dist.run_commands()
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 954, in run_commands
          self.run_command(cmd)
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\dist.py", line 991, in run_command
          super().run_command(command)
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
          cmd_obj.run()
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\command\bdist_wheel.py", line 442, in run
          self.run_command("install")
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\dist.py", line 991, in run_command
          super().run_command(command)
        File "C:\Users\nilas\AppData\Local\Temp\pip-build-env-r9hhxm6t\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
          cmd_obj.run()
        File "<string>", line 75, in run
        File "<string>", line 42, in run_pip_command
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['C:\\Users\\nilas\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\python.exe', '-m', 'pip', 'install', '--extra-index-url', 'https://pypi.nvidia.com', 'tensorrt-cu12_libs==10.5.0', 'tensorrt-cu12_bindings==10.5.0']' 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-cu12
Failed to build tensorrt-cu12
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (tensorrt-cu12)
~ 
lix19937 commented 1 month ago
  ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_3.12.2032.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\tensorrt_cu12_bindings-10.5.0.dist-info'  

Consider check the permissions. You can use a venv or conda, then install. @NevermindNilas

NevermindNilas commented 1 month ago

Thanks @lix19937

Under a venv it seems to work fine.

Output:

(venv) G:\TheAnimeScripter  celux-test  pip install tensorrt==10.5.0
Collecting tensorrt==10.5.0
  Downloading tensorrt-10.5.0.tar.gz (16 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting tensorrt-cu12==10.5.0 (from tensorrt==10.5.0)
  Using cached tensorrt-cu12-10.5.0.tar.gz (18 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: tensorrt, tensorrt-cu12
  Building wheel for tensorrt (pyproject.toml) ... done
  Created wheel for tensorrt: filename=tensorrt-10.5.0-py2.py3-none-any.whl size=16349 sha256=29bf1987981786d64f964099e71281f79304e865a393d02579aec19f6a48d07f
  Stored in directory: c:\users\nilas\appdata\local\pip\cache\wheels\db\93\12\1e1195dcfed5f98dfb651e0c522bda41fe718c6fc09c37cfd4
  Building wheel for tensorrt-cu12 (pyproject.toml) ... done
  Created wheel for tensorrt-cu12: filename=tensorrt_cu12-10.5.0-py2.py3-none-any.whl size=17571 sha256=00b6869ecc86d3d031b6ce3e64aaa9abdb722b9cae42b4b3be1f3235f5f5c887
  Stored in directory: c:\users\nilas\appdata\local\pip\cache\wheels\73\f0\b7\244ae67ed298b1b1a5ed32d9cd4b33ea2d543aefbab974d298
Successfully built tensorrt tensorrt-cu12
Installing collected packages: tensorrt-cu12, tensorrt
  Attempting uninstall: tensorrt-cu12
    Found existing installation: tensorrt-cu12 10.3.0
    Uninstalling tensorrt-cu12-10.3.0:
      Successfully uninstalled tensorrt-cu12-10.3.0
  Attempting uninstall: tensorrt
    Found existing installation: tensorrt 10.3.0
    Uninstalling tensorrt-10.3.0:
      Successfully uninstalled tensorrt-10.3.0
Successfully installed tensorrt-10.5.0 tensorrt-cu12-10.5.0
(venv) G:\TheAnimeScripter  celux-test 

After that I've ran it outside of the venv and it has installed just fine.

G:\TheAnimeScripter  celux-test  pip install tensorrt==10.5.0
Defaulting to user installation because normal site-packages is not writeable
Collecting tensorrt==10.5.0
  Using cached tensorrt-10.5.0-py2.py3-none-any.whl
Collecting tensorrt-cu12==10.5.0 (from tensorrt==10.5.0)
  Using cached tensorrt_cu12-10.5.0-py2.py3-none-any.whl
Installing collected packages: tensorrt-cu12, tensorrt
Successfully installed tensorrt-10.5.0 tensorrt-cu12-10.5.0
G:\TheAnimeScripter  celux-test 

This makes hardly any sense but I guess so long as it works - it works.