随笔-369  评论-37  文章-0  trackbacks-0
解压TensorRT-8.4.1.5的压缩包,进入根目录中的python路径下,ll发现几个文件:
tensorrt-8.4.1.5-cp310-none-linux_x86_64.whl
tensorrt-8.4.1.5-cp36-none-linux_x86_64.whl
tensorrt-8.4.1.5-cp37-none-linux_x86_64.whl
tensorrt-8.4.1.5-cp38-none-linux_x86_64.whl
tensorrt-8.4.1.5-cp39-none-linux_x86_64.whl

我之前安装的python的版本为3.10(apt install python3-dev),所以这里选择安装tensorrt-8.4.1.5-cp310-none-linux_x86_64.whl

执行pip安装命令:
pip install  tensorrt-8.4.1.5-cp310-none-linux_x86_64.whl
报错:
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
安装中止

执行命令:
apt install python3.10-venv

再次执行pip安装命令,
还是报错

执行命令:
python3 -m venv tutorial-env

再次执行pip安装命令,
还是报错

pip安装命令中使用--force-reinstall参数:
pip install --force-reinstall tensorrt-8.4.1.5-cp310-none-linux_x86_64.whl

仍然有Warning,但安装成功。
去你爹个懒子!
posted on 2022-07-28 14:45 小王 阅读(8356) 评论(0)  编辑 收藏 引用 所属分类: Python

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理