
安装 torch-tensorrt 报错
问题:
安装 torch-tensorrt 时遇到错误,提示「该软件包仅是 pypi.org 存储库上的占位符项目。要安装 torch-tensorrt,请运行以下命令: pip install torch-tensorrt -f https://github.com/nvidia/torch-tensorrt/releases」。
原因:
pypi 上上传的 torch-tensorrt 是无法使用的占位符项目。因此,pip 无法从 pypi 仓库中下载 torch-tensorrt。
解决方案:
绕过 pypi 源:
使用 -f 参数指定正确的下载源,例如:
pip install torch-tensorrt -f https://github.com/nvidia/torch-tensorrt/releases
手动下载 wheel 文件:
从 github 发布页面下载相应的 wheel 文件:https://github.com/nvidia/torch-tensorrt
将 wheel 文件下载到本地,然后使用 pip 命令手动安装:
pip install torch-tensorrt-x.y.z-py3-none-any.whl
(其中 x.y.z 为 wheel 文件的版本号)
更换下载源:
pip install torch-tensorrt -f https://github.com/nvidia/torch-tensorrt/releases -i https://mirrors.aliyun.com/pypi/simple/
pip install torch-tensorrt -f https://github.com/NVIDIA/Torch-TensorRT/releases -i https://pypi.tuna.tsinghua.edu.cn/simple
以上就是安装 torch-tensorrt 报错:如何解决 PyPI 占位符项目导致的安装问题?的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1352847.html
微信扫一扫
支付宝扫一扫