我使用 Debian 安装在我的虚拟机上安装了 TensorRT。如果我运行“dpkg -l | grep TensorRT”,我会得到预期的结果:
ii graphsurgeon-tf 5.0.2-1+cuda10.0 amd64 GraphSurgeon for TensorRT package
ii libnvinfer-dev 5.0.2-1+cuda10.0 amd64 TensorRT development libraries and headers
ii libnvinfer-samples 5.0.2-1+cuda10.0 all TensorRT samples and documentation
ii libnvinfer5 5.0.2-1+cuda10.0 amd64 TensorRT runtime libraries
ii python3-libnvinfer 5.0.2-1+cuda10.0 amd64 Python 3 bindings for TensorRT
ii python3-libnvinfer-dev 5.0.2-1+cuda10.0 amd64 Python 3 development package for TensorRT
ii tensorrt 5.0.2.6-1+cuda10.0 amd64 Meta package of TensorRT
ii uff-converter-tf 5.0.2-1+cuda10.0 amd64 UFF converter for TensorRT package
然而,当我尝试在 python 中导入它时,我得到:
File "<stdin>", line 1, in <module>
ImportError: No module named 'tensorrt'
我究竟做错了什么?