在ubuntu 16.04上安装python3.7时出错

aor9mmx1  于 5个月前  发布在  Python
关注(0)|答案(1)|浏览(82)

我试图在ubuntu 16.04上安装Python 3.7。我在互联网上尝试了安装步骤,但我得到了一个错误代码。
我的安装步骤:

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.7

字符串
我的错误:

E: Unable to locate package python3.7
E: Couldn't find any package by glob 'python3.7'
E: Couldn't find any package by regex 'python3.7


我尝试了这个方法:

sudo add-apt-repository ppa:deadsnakes/ppa   
sudo apt-get update   
sudo apt install python3.7


但我还是犯了同样的错误:

user@ubuntu:~$ sudo apt install python3.7  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python3.7
E: Couldn't find any package by glob 'python3.7'
E: Couldn't find any package by regex 'python3.7'


我该如何解决这些问题?

mec1mxoz

mec1mxoz1#

"supported Ubuntu and Python versions" here。看起来deadsnakes不再支持Ubuntu 16.04了,可能是因为it too is end-of-life
我建议

  • 升级到受支持的Ubuntu版本,
  • 或者,如果这不是一个选项,您可以使用pyenv安装所需版本的Python。

相关问题