Still on 20.04? IIRC it's out of service since April.
As far as I remember flatpak works.
Installing the gimp-python .deb from an earlier Ubuntu release (19.10 likely the latest) may be the easiest way, see here.
Building from source is doable (this is what I do, for this and other reasons) but if you are on 20.04 and want a recent Gimp you will have to build many other dependencies from source, so I would advise to move to 22.04 first.
As far as I remember flatpak works.
Installing the gimp-python .deb from an earlier Ubuntu release (19.10 likely the latest) may be the easiest way, see here.
Building from source is doable (this is what I do, for this and other reasons) but if you are on 20.04 and want a recent Gimp you will have to build many other dependencies from source, so I would advise to move to 22.04 first.