skip to Main Content

I would like to install tensorrt binding for python3 on Ubuntu 20.04 ( https://docs.nvidia.com/deeplearning/tensorrt/archives/tensorrt-700/tensorrt-install-guide/index.html#installing-debian ) . This Ubuntu has python 3.8 as a default, but those tensorrt bindings needs python 3.7 or lower.

The package is installed via sudo apt-get install python3-libnvinfer-dev . But this crash because of python 3.8 . So I have installed also python 3.7 via sudo apt-get install python3.7 so I can access 3.7 running command python3.7 . I have also made a ln -s /usr/bin/python3.7 /usr/bin/python3 to make a python3 command opennning the 3.7 version. But aptget still has a problem and python3.7 is not visible for it. What can I do to make python 3.7 native in Ubuntu 20.04 or how to tell apt-get to look in /usr/bin/python3.7 location? Thanks

2

Answers


  1. Check if http://web.mit.edu/6.00/www/handouts/pybuntu.html helps.
    unbuntu seems to ahvve update-alternative
    Didn’t try it myself.

    Login or Signup to reply.
  2. This should solve your problem. But i don’t know how to make python3.7 the default in Ubuntu 20.04.

    Download the tar file install package of your desired TensorRT version. Extract it. Navigate to the extracted folder and then to the python folder. You will find the .whl files for the TensorRT python API. Try installing with pip.

    In your case it should be like this(if you are trying to install TensorRT 7.1):

    python3.7 -m pip install tensorrt-7.1.3.4-cp37-none-linux_x86_64.whl
    

    I found this procedure from the official TensorRT github repository

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search