gimp-python not available in Ubuntu 20.04

Always worth holding off a couple of months and hope for fixes. The 'buntu PPA is not looking like updating any time soon. That leaves either a flatpak or an appimage.

I use gimp_gmic_qt for some things so that means the appimage. A try out in (k)ubuntu 20.04 and the appimage-with-plugins seems to work ok.

I had a 2.10.19 handy so used that, I unpack appimages that I use frequently, so this is running from my ‘home’. Resynthesizer + heal selection definitely working and as a test of python one of Ofnuts plugins:

gimp_gmic_qt. This my own compile, just to be up-to-date-ish Works fine.

However I think I wil be sticking with my kubuntu 18.04 for some time, the thought of installing all the little bits-and-pieces I accumulate does not appeal.

I think python 3 plugin support will arrive with gimp 3. The “old” python 2 plugins will then have to be rewritten.

python 2 is “dead” since January 1st 2020. Originally, python 2 support should end already in 2015 but because many developers did not upgrade their code the date was extended to 2020. So, actually it is not really a surprise that Ubuntu droped python 2 support with 20.04.

We should probably do a sticky thread in the gimp forum. “yes we know python2 support is disappearing and it is good”

2 Likes

This will not get fixed. more and more distributions will drop python 2 in the next few weeks. And it really is good they are finally doing it. people had 12 years to port to python 3 … at some point you have to say “enough” and make the cut.

3 Likes

Ah, sorry for not seeing the other thread.

Fortunately the main Resynthesizer plugin is still working, I’ve just had to go through all of the options to replicate the options the Python plugins provided (in my case Heal Transparency).

I opened up the python script for “heal selection” thinking that it would help me pick the correct options using the Resynthesize tool, but I couldn’t get it to work like the heal selection script works. Is the script doing more than just selecting options?

Is it possible to port the heal selection python script to python 3 manually so it works in the version of Gimp provided by Ubuntu 20.04? or is there more to it than just rewriting the python script?

Any other ideas?

@hellocatfood - Do you have any idea what options I would need to put into Resynthesize to match “Heal Selection” as you already successfully figured out “heal transparency” you might have the secret for Heal Selection as well. I’ve tried all kinds of options and I just can’t get it to look right.

Thanks in Advance

I don’t know enough Python to know exactly what it’s doing but reading the code plus the comments there’s Python code to basically properly select the area for doing the healing.

With the removal of the gimp-python package GIMP has no python bindings, so no Python plugins are working (python-fu is gone from the Filters menu). The plugin will still need to be ported to Python 3 but GIMP would wlso need to be compiled to use Python 3. The developers have said that the Master branch already uses Python 3 but that it won’t be backported.

Sorry, no. The Heal Selection plugin is more complex than Heal Transparency and I can’t work it out. Best bet would be learn more about gimp’s python bindings to figure out what it’s doing GIMP - Documentation and generally wait for it to be ported to Python 3 Migrate to python3 · Issue #67 · bootchk/resynthesizer · GitHub

Thank you for all your help and insight. I’ll guess I’ll have to wait. In the meantime I still have a workaround - although one I really don’t like so much. I do have a windoze 10 machine handy and heal selection works just fine on Windows 10… Sad state of affairs when I resort to going Windows for something that Linux can’t do…

I can always fire up my Ubuntu 18.04 VM - heal selection works just fine there also… Just hate firing up a vm just for a single use purpose - now to decide which of the two is the better of the two “evils” - Using Windoze or using an old vm image for a single use purpose…

I now use the AppImage from @Carmelo_DrRaw, you can find it in GitHub.
With the “release” version of the 2.10.18 AppImage with plugins bundled I’m able to use Python scripts (e.g. some scripts from @Ofnuts) and they work fine, even if my system (Manjaro 20) doesn’t have Python2, neither gimp-python.

That’s the only way I’m now able to use GIMP fully. I hope they solve this thing soon in some way, because I’m not sure if there’s (at least for me) any real alternative to GIMP.
I’ll have to stick to an old enough AppImage that still works, or to use a VM, I guess… but neither of these solutions should be long term. And I hate having out-of-date/unsopported software.

As @darix said above this isn’t something which can be “fixed”. Python 2 is gone from Ubuntu (and likely will be for other distributions soon), and Python 3 is already in latest unreleased GIMP, so it’s just a case of waiting, or porting the Resynthesizer plugins to scheme/script fu.

Still, good to know that the Appimage works!

1 Like

OK, I’m not native, maybe I mess up the wording.
What I mean is that I’d like to be able to keep using GIMP without loss of power or functionality.
I know perfectly well about Python2 (I code in Python). It would be a pity if for this reason GIMP would get worse than it was until now.
Right now, speaking purely as a user, the functionality and the user experience is getting worse, unfortunately, it’s not even staying the same. This is always a negative thing, for any software, from the user point of view.
I needed to come up with workarounds to keep doing what I was doing before. Ideally, a tool should never get worse, at the minimum it should stay the same (also here I don’t know exactly how to express it). Getting better is a plus (optional, let’s say).

Please, note I’m not complaining here, I know fully well how hard it is to keep GIMP as it is, and I’m indefinitely grateful for just having it. But I think it’s fair to say that this situation with Python is really a pity at the moment. GIMP did get worse for me in the past weeks/months. And it does not look brighter in the immediate future (unless I stick to these workarounds).

1 Like

Then don’t upgrade. that’s one of the best things about Free Software, nobody is making you do anything. If you’re happy stay with that version until its feasible to upgrade.

1 Like

I’m fully aware of that :smiley:
It is really good, and I’d setup a VM to run that. But I do want (as I always did) to take advantage of updated distros and software (e.g. for newest lib versions, especially if I have new cameras).
But I’d then have a new distro, that comes with GIMP in it, most likely, but that GIMP will be potentially an inferior version to one I was using before, so I’d have to find some workaround to make it work (e.g. a VM with a different distros).
And yes, I agree, the beauty of FOSS is that it allows for such workarounds. But I still think it’s a pity, whenever a step-back has to be made (independently of the technical reason).

I tried that a couple of days ago after reading that someone else had success going that route, but didn’t have the heal selection option. Maybe I used the wrong release version. I’ll try it again. I like the concept of having some applications all rolled into a single package so that dependencies can all be included and embedded in the “executable” without impacting other applications. Although from a security perspective - it’s a little on the scary side.

[EDIT 4/30/2020 3:24 AM Central]
Eureka!!! That worked! apparently first time I tried it was with 2.10.8 not 2.10.18.

The AppImage for 2.10.18 works just fine! Thanks everyone!

1 Like

It’s actually not that unsafe, your system is not really affected, and you run it as user.
It’s more dangerous to use PPAs (e.g. in Ubuntu), for instance. They do affect your entire system and they can update any lib/package in your system, with privileges.

Since this thread is the top hit for a Google search for the gimp-python problem, I’ll post the solution that I found. Ubuntu 18.10’s gimp-python can be manually downloaded and installed into Ubuntu 20.04. One other completely missing missing package, python-gtk2, also needs downloading. All other dependencies can be installed normally from 20.04. No security problems since it’s all from Ubuntu. No forced installation to ignore missing dependencies. “Heal Selection” works, and unlike the flatpak version, GMIC QT works.

wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-6_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/gimp/gimp-python_2.10.8-2_amd64.deb

sudo apt install gimp gimp-plugin-registry gimp-gmic
sudo apt install python python-cairo python-gobject-2

sudo dpkg -i python-gtk2_2.24.0-6_amd64.deb
sudo dpkg -i gimp-python_2.10.8-2_amd64.deb
1 Like

Thanks :wink: useful to know.
The security issues may come, not because of the source of the packages, which is trusted, but because those packages won’t receive updates, for instance in case vulnerabilities are found in the future.
And even if they receive updates from Ubuntu, you’ll have to manually download and update again, I think, they won’t be part of the automatic updates with this installation, I’m quite sure.
So, if strict security is to be maintained on the machine, those packages must be tracked by hand.

My workaround, on Majaro, is to use the AppImage from @Carmelo_DrRaw, and it works quite well.
Once I move to Ubuntu 20.04 on my other machine (unless I change distro altogether…) I’ll probably use the same workaround when I need the python plugins.

Mixing packages from different releases of a distribution is absolutely not recommended. It will eventually break.

The AppImage works great!

3 Likes

That is interesting to hear. Currently I’m running Mint 19.3 Cinnamon (Based on Ubuntu 18.04). So I think I’ll face similar issues with regards to Python 2 when it comes to upgrading to a Ubuntu 20.04 based distro. So I think I’ll download the Gimp appimage to save any hassles of missing python2 libs! :slight_smile:

2 Likes