Adding Python Plugin Support to GIMP on Fedora

Hello,

I am unable to get a GIMP plugin written in Python (.py) to work on my system. I have discovered that GIMP was initially built without support for Python plugins. On other operating systems, it is sufficient to install the gimp-python package and GIMP will then have support for Python plugins, but for some reason there is no such RPM package available in Fedora 39.

I tried an alternative approach and downloaded an Appimage file with plugin support, but when launching this Appimage GIMP gives an error: “Failed to execute child process, python or python2 not found”. However, Python (version 3) and Python2 are installed on my system.

How can I add support for Python plugins? I would prefer to do this without alternative methods, and instead install an additional RPM package via dnf.

A few years ago, GIMP used to work out-of-the-box with plugins on Fedora, it’s a shame this was removed!

Thank you.

I had a quick look and Python support has not been disabled in the build. Here’s the spec file:

https://src.fedoraproject.org/rpms/gimp/blob/rawhide/f/gimp.spec#_106

What error are you getting with the rpm version? (I don’t know how appimage works, so not sure about that side of things)

Added gimp

Added extensions, python, rpm

Yes, you’re right that Python support was the default, but GIMP still didn’t understand the plugins. I installed the pygtk2 RPM package and everything started working.

1 Like

The corresponding bug is here. There are actually two issues:

  • gimp should “require” pygtk2, or else not even the gimp-python console works
  • Not much of the python2 ecosystem is left in Fedora.

So, as soon as your plugin needs a python package, you will have to get the python2 version from outside of Fedora.
Gimp 3 will use python 3, but the python plug-in interface changed completely and - as of yet - seems to lack some functionality. Also, there is no release timeline that I know of. So we might have to deal with Gimp 2/Python 2 for a while …

1 Like