我的平台是WIN10,我希望在python上面运行。我按照您的指导完成了tensorRT的安装,在VC上测试也通过了,我希望在PYTHON3.7上运行,import tensorrt还是报ModuleNotFoundError: No module named 'tensorrt',这是怎么回事?
确认 CUDA 版本是 9.0 或者 10.0,可通过运行 nvcc -V 指令来查看 CUDA,如果不是 9.0 以上,则需要先把 CUDA 版本更新一下
cudnn 版本是 7.3.1,如果不满足要求,按照《Linux之cudnn升级方法》进行升级
需安装有 TensorFlow,uff模块需要
如果要使用 Python 接口的 TensorRT,则需要安装 Pycuda
pip install 'pycuda>=2017.1.1'
因为你是python 版本,使用 pip 安装,需要执行下边的指令
cd TensorRT-5.0.2.6/python
pip install tensorrt-5.0.2.6-py2.py3-none-any.whl
cd TensorRT-5.0.2.6/uff
pip install uff-0.5.5-py2.py3-none-any.whl
cd TensorRT-5.0.2.6/graphsurgeon
pip install graphsurgeon-0.3.2-py2.py3-none-any.whl
如果还不行,用python3.6吧