如何在 16.04 上安装 python 3.5?

如何在 16.04 上安装 python 3.5?
sudo apt-get install python 3.5.8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libghc-blaze-svg-dev-0.3.5-84036:i386' for regex '3.5.8'
Note, selecting 'libghc-blaze-svg-prof-0.3.5-84036:i386' for regex '3.5.8'
Note, selecting 'libghc-blaze-svg-dev:i386' instead of 'libghc-blaze-svg-dev-0.3.5-84036:i386'
Note, selecting 'libghc-blaze-svg-prof:i386' instead of 'libghc-blaze-svg-prof-0.3.5-84036:i386'
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:
 dkms : Breaks: shim-signed (< 1.33.1~16.04.4) but 1.12+0.8-0ubuntu2 is to be installed
 libghc-blaze-svg-dev:i386 : Depends: libghc-base-dev-4.8.2.0-a3ce8:i386
                             Depends: libghc-blaze-markup-dev-0.7.0.3-608bf:i386
                             Depends: libghc-mtl-dev-2.2.1-05005:i386
 libghc-blaze-svg-prof:i386 : Depends: libghc-base-prof-4.8.2.0-a3ce8:i386
                              Depends: libghc-blaze-markup-prof-0.7.0.3-608bf:i386
                              Depends: libghc-mtl-prof-2.2.1-05005:i386

答案1

Ubuntu 16.04 默认安装了 Python 3.5。

请检查python3.5 --version终端。

答案2

您无需提供版本号作为参数。这会导致apt-get install查找与“3.5.8”匹配的软件包。如果您想要特定的软件包版本,请查看https://askubuntu.com/a/428778/756449

相关内容