Method 5: Zip File Installation (Windows)#
Recommended for: C++ and Python development on Windows, custom installation paths
Advantages:
✓ High flexibility in installation location ✓ No administrator privileges needed for installation ✓ Multiple versions can coexist ✓ Includes C++ headers
Limitations:
✗ Requires manual dependency management ✗ Manual
PATHconfiguration ✗ No automatic updates ✗ More complex setup than pip
Platform Support#
Supported Operating Systems:
Windows 10 (x64)
Windows 11 (x64)
Windows Server 2022 (x64)
Prerequisites:
CUDA Toolkit installed (zip file or package manager)
Installation Steps#
Step 1: Download the TensorRT zip file
From the TensorRT download page, download the TensorRT zip file for Windows.
Step 2: Choose installation directory
Choose where you want to install TensorRT. This zip file will install everything into a subdirectory called TensorRT-10.x.x.x. This new subdirectory will be called <installpath> in the steps below.
Step 3: Extract the zip file
Unzip the TensorRT-10.x.x.x..Windows.amd64.cuda-x.x.zip file to the location you chose.
Step 4: Set environment variables
Add the TensorRT library files to your system PATH by adding <installpath>\bin to your system PATH environment variable. Follow these steps:
Press the Windows key and search for environment variables. You should then be able to click Edit the System Environment Variables.
Click Environment Variables… at the bottom of the window.
Under System variables, select Path and click Edit….
Click either New or Browse to add a new item that contains
<installpath>\bin.Continue to click OK until all the newly opened windows are closed.
Step 5 (Optional): Install Python wheels
Install one of the TensorRT Python wheel files from <installpath>\python. Replace cp3x with the desired Python version (such as cp310 for Python 3.10):
python.exe -m pip install tensorrt-*-cp3x-none-win_amd64.whl
Optionally, install the TensorRT lean and dispatch runtime wheel files:
python.exe -m pip install tensorrt_lean-*-cp3x-none-win_amd64.whl
python.exe -m pip install tensorrt_dispatch-*-cp3x-none-win_amd64.whl
Verification#
C++ Verification:
Samples and sample data are only available from GitHub. Refer to the TensorRT Sample Support Guide for how to obtain the samples from GitHub and build the samples using CMake. The instructions to prepare the sample data can be found within the samples README.md.
If you want to use TensorRT in your project, ensure that the following is present in your Visual Studio Solution project properties:
<installpath>\binhas been added to yourPATHvariable and is present under VC++ Directories > Executable Directories.<installpath>\includeis present under C/C++ > General > Additional Directories.nvinfer_10.liband any otherLIBfiles your project requires are present under Linker > Input > Additional Dependencies.
Note
You should install Visual Studio 2022 or later to build the included samples. The community edition is sufficient to build the TensorRT samples.
Python Verification:
import tensorrt as trt
print(trt.__version__)
assert trt.Builder(trt.Logger())
Troubleshooting#
Issue: DLL load failed: The specified module could not be found
Solution: Ensure
PATHincludes<installpath>\liband that CUDA libraries are in your systemPATH.
Issue: Visual Studio cannot find TensorRT headers
Solution: Add
<installpath>\includeto your project’s Additional Include Directories in Visual Studio project properties.
Issue: Linker errors when building samples
Solution: Add
<installpath>\libto your project’s Additional Library Directories in Visual Studio project properties.