Reference link:
Install tensorrt under windows (python call)
Download link:
NVIDIA TensorRT 8.x Download | NVIDIA Developer
Download the GA version, the premise is that I have installed cuda and cudnn a long time ago, cuda is 11.6, so I downloaded this
Unzip and copy the include folder to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6
Then copy the dll file under the lib folder to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin
Copy the lib file under the lib folder to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\lib\x64.
Then install 4 whl files, as shown in the figure below, to correspond to your own python version, mine is 3.8
Enter this folder in annaconda and install the corresponding whl file, for example
After the installation is complete, try this program in a py file
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import tensorrt as trt
if __name__ == "__main__":
print(trt.__version__)
print("hello trt!!")
It's okay to be like me