安装 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 文件:
将 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 占位符项目导致的安装问题?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号