gpt4 book ai didi

linux - 导入错误 : No module named 'tensorrt'

转载 作者:太空狗 更新时间:2023-10-29 12:39:09 25 4
gpt4 key购买 nike

我使用 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'

我做错了什么?

最佳答案

只需运行这些命令:

pip install nvidia-pyindex
pip install nvidia-tensorrt

关于linux - 导入错误 : No module named 'tensorrt' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55557912/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com