Recently, the pyAstro menu disappeared from the menu bar.
The GIMP version is 2.10.36 on my desktop. I installed it with sudo apt install gimp. On one of my laptop, the version is 2.10.30, with the same issue.
Plug-ins are setup into /home/robert/.config/GIMP/2.10/plug-ins.
09-03-2024, 10:18 AM (This post was last modified: 09-03-2024, 11:43 AM by rich2005.)
There is a good chance that the distro you use no longer supports python 2.7 which is needed for Gimp python plugins.
Have a look in the filters menu for the Python-Fu entry. Not there ? then there is no python support.
Options ?
It might depend on your distro. 'buntu 22.04 and later / Mint / Debian try the flatpak Gimp version. That comes with its own python2.7 but is sandboxed which can be a problem if you scan / print from Gimp. Try and see.
OK, the menu pyAstro appears into the menu bar. But only some of the plugins are active. By example, the plug-in named python-set-dark-sky.py is not loaded. There are 41 plug-ins and only 16 are loaded (image joined).
09-04-2024, 05:47 AM (This post was last modified: 09-04-2024, 06:27 AM by PixLab.)
(09-04-2024, 04:27 AM)saturnin51 Wrote: Could you tell me why ?
Usually it's because they need an image already open on the canvas, or maybe multiple layers, or an alpha channel on the selected layer/image or no alpha channel, and many other reasons.
For instance, pyastro-set-dark-sky.py needs an RGB image as it is written "RGB*" in the source code, thus grayscale or indexed image will disabled it (although there is an * thus I'm not sure it should disabled when indexed or grayscale, Ofnuts or Rich2005 can confirm or disconfirm)
09-04-2024, 09:42 AM (This post was last modified: 09-04-2024, 12:15 PM by rich2005.
Edit Reason: edit
)
Using the appimage. A bit of testing and I only get 5 of the 66 plugins showing. Most fail like this GIMP-Error: Unable to run plug-in "pyastro_pixel_peek.py"
(/home/rich/gimp210/plugin-test/pyastro_pixel_peek.py)
Failed to execute child process “/home/rich/gimp210/plugin-test/pyastro_pixel_peek.py” (Exec format error)
Why, I do not know. I tried in an older Gimp 2.10.22 appimage and even worse, none of them worked. (edit: but then my older laptop running kubuntu 22.04 + jammy python appimage launcher and all seem to work )
It looks like you will have to go to a flatpak Gimp 2.10 see: https://www.gimp.org/downloads/ where there is install information.
Flatpak Gimp will co-exist with your existing Gimp so you can swap (save/open) images between them.
Adding plugins to a flatpak can be a pain, the easiest way is add the pyastro3 folder containing the plugins to the plug-ins folder list.
I noticed a difference in the functioning of Python 2.7, if you want to run plug-ins in older Python you need to have the older Python, IvanHC makes an appimage of Gimp 2.10.38, but with the Python2 of Debian 10 Buster... that is, very old, which I really like.
(09-04-2024, 04:27 AM)saturnin51 Wrote: Could you tell me why ?
Usually it's because they need an image already open on the canvas, or maybe multiple layers, or an alpha channel on the selected layer/image or no alpha channel, and many other reasons.
For instance, pyastro-set-dark-sky.py needs an RGB image as it is written "RGB*" in the source code, thus grayscale or indexed image will disabled it (although there is an * thus I'm not sure it should disabled when indexed or grayscale, Ofnuts or Rich2005 can confirm or disconfirm)
Yes "RGB*" means that the plugin is only active for RGB or RGBA images (ie, RGB images with or without alpha channels).
(09-04-2024, 04:27 AM)saturnin51 Wrote: OK, the menu pyAstro appears into the menu bar. But only some of the plugins are active. By example, the plug-in named python-set-dark-sky.py is not loaded. There are 41 plug-ins and only 16 are loaded (image joined).
Could you tell me why ?
Matter of vocabulary but they are all loaded and registered. If they show up in the menu it means that Gimùp was able to run them to make them "register" (tell Gimp what they expect as inputs). Some are disabled/grayed out because the author has put restrictions on the kind of images the plugin can work on (typically only work on either RGB or grayscale images), and the current image isn't of the right type.