【发布时间】:2020-10-29 03:04:14
【问题描述】:
我想在 Ubuntu 20.04 (https://docs.nvidia.com/deeplearning/tensorrt/archives/tensorrt-700/tensorrt-install-guide/index.html#installing-debian) 上为 python3 安装 tensorrt 绑定。此 Ubuntu 默认使用 python 3.8,但这些 tensorrt 绑定需要 python 3.7 或更低版本。
该软件包是通过 sudo apt-get install python3-libnvinfer-dev 安装的。但是这次崩溃是因为 python 3.8 。所以我还通过sudo apt-get install python3.7 安装了python 3.7,所以我可以访问3.7 运行命令 python3.7 。我还制作了一个 ln -s /usr/bin/python3.7 /usr/bin/python3 来制作一个打开 3.7 版本的 python3 命令。但是aptget还是有问题,python3.7对它不可见。我该怎么做才能在 Ubuntu 20.04 中使 python 3.7 本机或如何告诉 apt-get 在 /usr/bin/python3.7 位置中查找?谢谢
【问题讨论】:
-
你能发布哪个命令给你一个错误和实际的错误信息吗?
-
是的。使用 sudo apt-get install python3-libnvinfer-dev ,我收到错误
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: python3-libnvinfer : Depends: python3 (< 3.7) but 3.8.2-0ubuntu2 is to be installed E: Unable to correct problems, you have held broken packages.` -
哪个python3让我/home/tom/miniconda3/bin/python3.7
标签: python-3.x linux