Gimp-Forum.net
Can't get resynthesizer to work on Gimp 2.10.34 - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Installation and usage (https://www.gimp-forum.net/Forum-Installation-and-usage)
+---- Forum: Linux and other Unixen (https://www.gimp-forum.net/Forum-Linux-and-other-Unixen)
+---- Thread: Can't get resynthesizer to work on Gimp 2.10.34 (/Thread-Can-t-get-resynthesizer-to-work-on-Gimp-2-10-34)



Can't get resynthesizer to work on Gimp 2.10.34 - giutor - 10-08-2023

Hi,

I downloaded the plugin from the github repository but I get this ouput:

Code:
Parsing '/home/gt/.config/GIMP/2.10/pluginrc'
Querying plug-in: '/usr/lib/gimp/2.0/plug-ins/file-rawtherapee/file-rawtherapee'
Querying plug-in: '/usr/lib/gimp/2.0/plug-ins/file-darktable/file-darktable'
Querying plug-in: '/home/gt/.config/GIMP/2.10/plug-ins/plugin-uncrop.py'
 File "/home/gt/.config/GIMP/2.10/plug-ins/plugin-uncrop.py", line 94
   raise RuntimeError, "Failed duplicate image"
                     ^
SyntaxError: invalid syntax
gimp: LibGimpBase-WARNING: gimp: gimp_wire_read(): error
Terminating plug-in: '/home/gt/.config/GIMP/2.10/plug-ins/plugin-uncrop.py'
Querying plug-in: '/home/gt/.config/GIMP/2.10/plug-ins/plugin-resynth-sharpen.py'
 File "/home/gt/.config/GIMP/2.10/plug-ins/plugin-resynth-sharpen.py", line 53
   raise RuntimeError, "Failed duplicate image"
                     ^
SyntaxError: invalid syntax
gimp: LibGimpBase-WARNING: gimp: gimp_wire_read(): error
Terminating plug-in: '/home/gt/.config/GIMP/2.10/plug-ins/plugin-resynth-sharpen.py'
Querying plug-in: '/home/gt/.config/GIMP/2.10/plug-ins/plugin-resynth-fill-pattern.py'
Traceback (most recent call last):
 File "/home/gt/.config/GIMP/2.10/plug-ins/plugin-resynth-fill-pattern.py", line 33, in <module>
   from gimpfu import *
ModuleNotFoundError: No module named 'gimpfu'
gimp: LibGimpBase-WARNING: gimp: gimp_wire_read(): error
Terminating plug-in: '/home/gt/.config/GIMP/2.10/plug-ins/plugin-resynth-fill-pattern.py'
Querying plug-in: '/home/gt/.config/GIMP/2.10/plug-ins/plugin-resynth-enlarge.py'
 File "/home/gt/.config/GIMP/2.10/plug-ins/plugin-resynth-enlarge.py", line 54
   raise RuntimeError, "Failed duplicate image"

How do I get Resynthesizer to work? Thanks Smile


RE: Can't get resynthesizer to work on Gimp 2.10.34 - Ofnuts - 10-08-2023

Look like you are trying to run in Python v3 a plugin written for Python v2.

Gimp python plugins must be run with Python v2, and Python v2 (and is support for Gimp) is being removed from major distros (Ubuntu, in particular), since Python v2 is no longer supported.

There are ways around this, see for instance https://www.gimp-forum.net/Thread-Heal-Selection-Missing-from-Gimp-on-Ubuntu-20-04?pid=18351#pid18351

Note that in your particular case on your system the python command elicits Python v3 (which is why the plugin is run with the wrong Python version) and Gimp (and the plugin authors because the shebang says: #!/usr/bin/env python expects it to run Python v2. This can possibly be tweaked if you want to keep python as Python v3.


RE: Can't get resynthesizer to work on Gimp 2.10.34 - rich2005 - 10-08-2023

@giutor

It helps if you give details of the linux distro you use and the version of Gimp 2.10.x (+ any other details, such as self-compiled / flatpak / snap )

You downloaded from the github site: https://github.com/bootchk/resynthesizer Then what ? Did you self compile the resynthesizer / resynthesizer-gui plugins for your system or get them from some where else ?


RE: Can't get resynthesizer to work on Gimp 2.10.34 - giutor - 10-08-2023

(10-08-2023, 11:17 AM)Ofnuts Wrote: Look like you are trying to run in Python v3 a plugin written for Python v2.

Gimp python plugins must be run with Python v2, and Python v2 (and is support for Gimp) is being removed from major distros (Ubuntu, in particular), since Python v2 is no longer supported.

There are ways around this, see for instance https://www.gimp-forum.net/Thread-Heal-Selection-Missing-from-Gimp-on-Ubuntu-20-04?pid=18351#pid18351

Note that in your particular case on your system the python command elicits Python v3 (which is why the plugin is run with the wrong Python version) and Gimp (and the plugin authors because the shebang says: #!/usr/bin/env python expects it to run Python v2. This can possibly be tweaked if you want to keep python as Python v3.

Thank you so much for your reply. Yes, I don't have python v2 and I made a symbolic link to python3 on my Debian 12. Thank you again.

(10-08-2023, 11:46 AM)rich2005 Wrote: @giutor

It helps if you give details of the linux distro you use and the version of Gimp 2.10.x (+ any other details, such as self-compiled / flatpak / snap )

You downloaded from the github site: https://github.com/bootchk/resynthesizer  Then what ? Did you self compile the resynthesizer / resynthesizer-gui plugins for your system or get them from some where else ?

Thanks for the reply. I run Debian 12 bookworm and Gimp 2.10.34. I just extracted the *.py files from the plugins folder in the zip file downloaded from github. I don't like Flatpak.


RE: Can't get resynthesizer to work on Gimp 2.10.34 - rich2005 - 10-08-2023

(10-08-2023, 11:57 AM)giutor Wrote: Thanks for the reply. I run Debian 12 bookworm and Gimp 2.10.34. I just extracted the *.py files from the plugins folder in the zip file downloaded from github. I don't like Flatpak.  

Yeah, I do not like flatpak either, but in this case it is probably the solution, there is a specific flatpak resynthesizer package

Those python plugins require the resynthesizer / resynthesizer-gui compiled plugins Compile them or get from another source. Regardless the python plugins not work anyway without gimp-python2 installed.

There is a solution using an appimage to launch Gimp and add python 2 but these are based on Ubuntu and MXlinux
https://github.com/TasMania17/Gimp-Appimages-Made-From-Debs/releases/tag/Gimp-Python2-AppImage-Launchers-for-Linux
I do not think the ubuntu version works with Debian but try it anyway.

An alternative solution is the gimp_gmic_qt plugin http://www.gmic.eu and the inpaint filter equivalent to heal-selection. Example of use here https://patdavid.net/2014/02/getting-around-in-gimp-gmic-inpainting-content-aware-fill/


RE: Can't get resynthesizer to work on Gimp 2.10.34 - PixLab - 10-08-2023

(10-08-2023, 12:56 PM)rich2005 Wrote: There is a solution using an appimage to launch Gimp and add python 2 but these are based on Ubuntu and MXlinux
https://github.com/TasMania17/Gimp-Appimages-Made-From-Debs/releases/tag/Gimp-Python2-AppImage-Launchers-for-Linux
I do not think the ubuntu version works with Debian but try it anyway.

The one for MX Linux should work on Debian as MX is based on Debian
But you might need to install fuseoverlaysf, if the appimage does not work (all is explained on Tas_mania github Wink )
Code:
sudo apt install fuse-overlayfs



RE: Can't get resynthesizer to work on Gimp 2.10.34 - giutor - 10-08-2023

(10-08-2023, 03:28 PM)PixLab Wrote:
(10-08-2023, 12:56 PM)rich2005 Wrote: There is a solution using an appimage to launch Gimp and add python 2 but these are based on Ubuntu and MXlinux
https://github.com/TasMania17/Gimp-Appimages-Made-From-Debs/releases/tag/Gimp-Python2-AppImage-Launchers-for-Linux
I do not think the ubuntu version works with Debian but try it anyway.

The one for MX Linux should work on Debian as MX is based on Debian
But you might need to install fuseoverlaysf, if the appimage does not work (all is explained on Tas_mania github Wink )
Code:
sudo apt install fuse-overlayfs


Thank you all guys, I appreciate.