GIMP Python Plugins Won't Run in Ubuntu 20.04

Bug #1881684 reported by linux4me
66
This bug affects 13 people
Affects Status Importance Assigned to Milestone
gimp (Debian)
Fix Released
Unknown
gimp (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm using Ubuntu 20.04 and GIMP installed via apt, v. 2.10.18.

To reproduce the problem:

Install a python-based plugin in ~/.config/GIMP/2.10/plug-ins. In my case, it was Export Layers (https://github.com/khalim19/gimp-plugin-export-layers).

Run GIMP from Terminal and you see:

/usr/bin/env: ‘python’: No such file or directory
gimp: LibGimpBase-WARNING: gimp: gimp_wire_read(): error

There is no "Python-fu" menu item on the Filters menu in GIMP even with a python-based plugin installed in ~/.config/GIMP/2.10/plug-ins, and that folder listed in GIMP -> Preferences -> Folders -> Plugins.

What I expect to happen is to be able to run GIMP python-based plugins, and to have the Python-fu menu item on the Filters menu when a python-based plugin is installed.

The cause seems to be that 20.04 does not provide the package gimp-python, which is not listed as a dependency or a "suggests" on the package page for Focal (https://packages.ubuntu.com/focal/gimp) though it is for Eoan.

I did find a workaround. Here are the steps:

sudo apt install python-cairo python-gobject-2
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 dpkg -i python-gtk2_2.24.0-6_amd64.deb
sudo dpkg -i gimp-python_2.10.8-2_amd64.deb

Once I did that, GIMP started without any errors and Export Layers works just fine.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gimp (Ubuntu):
status: New → Confirmed
Changed in gimp (Debian):
status: Unknown → Fix Released
Revision history for this message
AlfyBoy (alfonsociologo) wrote :

I had a problem when:

wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-6_amd64.deb

04 Not Found
2021-01-01 14:10:54 ERROR 404: Not Found.

and

wget http://archive.ubuntu.com/ubuntu/pool/universe/g/gimp/gimp-python_2.10.8-2_amd64.deb

404 Not Found
2021-01-01 14:17:58 ERROR 404: Not Found.

So i found them here:

http://mirror.ip-projects.de/ubuntu/pool/universe/p/pygtk/

https://packages.debian.org/buster/amd64/gimp-python/download

Now GIMP python-based plugins are running. If it is useful to anyone.

Revision history for this message
Eneko Castresana (ecv80) wrote :

Thanks AlfyBoy. So, to put it together, the new instructions are:

sudo apt install python-cairo python-gobject-2
wget http://mirror.ip-projects.de/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-6_amd64.deb
wget http://ftp.de.debian.org/debian/pool/main/g/gimp/gimp-python_2.10.8-2_amd64.deb
sudo dpkg -i python-gtk2_2.24.0-6_amd64.deb
sudo dpkg -i gimp-python_2.10.8-2_amd64.deb

Revision history for this message
Bruno Duyé (brunetton-gmail) wrote :

Same here; tried this workaround but this don't work anymore (Ubuntu 21.10): python-gobject-2 and python-cairo packages doesn't exists anymore

Revision history for this message
A Tester (atester) wrote (last edit ):

Registered to add this comment thanking linux4me, Eneko, and AlfyBoy for their contributions.
TLDR: It worked !

Background - I had been using Ubunto 18.04 LTS with a gimp with several python plugins that I use a lot - a contact sheet generator, and a path distance pixel counter in particular.

The EOL of Ubuntu 18.04 in April 2023 prompted me to consider upgrade routes, and having tried a live version of 22.04 decided to *upgrade* the existing installation to Ubuntu 20.04 LTS.

This resulted in the previous gimp (2.8) being replaced with 2.10.18, and as I soon found, as have so many others, that the python scripts no longer functioned - and were not even shown on the menus.

Lots of things tried; even rewriting the python scripts from 2 to 3 (using 2to3). The frequently suggested gimp-python2 appimage failed - apparently compiled on Ubunto 22.04, so it wouldn't work on my earlier 20.04. Various pythons were tried, together with various tricks to try and get gimp to use them. All failed.

This page then came up in a search. I found that I already had the latest python-cairo, and that the two debs given in post #3 were available. Downloaded and built with dpkg.

Success!

Thanks again. This solution needs greater exposure, and longterm preservation of those debs ...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.