Error installing python3.7 on ubuntu 16.04

162 Views Asked by At

I'm trying to install Python3.7 on ubuntu 16.04. I tried the installation steps on the internet, but I got an error code.

My installation steps:

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

And my error:

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

I tried this method:

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

But I still got the same error:

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'

How can I solve these problems?

1

There are 1 best solutions below

0
AKX On

See "supported Ubuntu and Python versions" here. It seems Ubuntu 16.04 is not supported by deadsnakes anymore, probably because it too is end-of-life.

I would suggest

  • upgrading to a supported version of Ubuntu,
  • or if that's not an option, you may be able to install the desired version of Python with pyenv.