解壓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
小王 閱讀(8963)
評論(0) 編輯 收藏 引用 所屬分類:
Python