2

Following from this, I am trying to install like so (in docker, but also same error directly on host):

RUN apt-get update && \
    apt-get install -y software-properties-common && \
    add-apt-repository -y ppa:deadsnakes/ppa && \
    apt-get update && \
    apt install -y python3.7

I am getting

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'

This was working, and one day it stopped. I don't know if I did something, or if something happened on deadsnakes or elsewhere.

How to get Python3.7 in the docker, and in the host?

Gulzar
  • 23,452
  • 27
  • 113
  • 201
  • Just out of curiosity , why are you using Ubuntu 16.04 ( which is not supported anymore since april 2021) in 2022? – eshirvana Jan 24 '22 at 16:56
  • 3
    If you look the ppa, there's no support for ubuntu 16.04. https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa – iuridiniz Jan 24 '22 at 16:57
  • 2
    and probably you should ask your question in https://askubuntu.com/ – eshirvana Jan 24 '22 at 16:58
  • @eshirvana [market powers](https://en.wikipedia.org/wiki/Market_power) at play. We are attempting to migrate now. It takes time. – Gulzar Jan 24 '22 at 17:07
  • @iuridiniz fair enough, how do I still do it then? – Gulzar Jan 24 '22 at 17:09
  • 1
    @Gulzar if you have to stick in ubuntu 16.04, IMHO you have to compile python3.7 by hand. – iuridiniz Jan 24 '22 at 17:13
  • What about your dockerfile skills? My suggestion will envolve create a two stage dockerfile, first stage compile a python3.7.deb and the second stage installs it. Can you use start from this second stage? – iuridiniz Jan 24 '22 at 19:41
  • [This](https://stackoverflow.com/questions/70866415/how-to-install-python-specific-version-on-docker) is the answer - install from source. – Gulzar Feb 08 '22 at 17:44

0 Answers0